[+] Add instance to navigation
This commit is contained in:
@@ -17,11 +17,17 @@ export default class Navigation extends Vue
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@Prop() courses: Course[];
|
@Prop() courses: Course[];
|
||||||
|
|
||||||
|
// Instance
|
||||||
|
public static instance: Navigation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is called when the instance is created.
|
* This is called when the instance is created.
|
||||||
*/
|
*/
|
||||||
public created()
|
public created()
|
||||||
{
|
{
|
||||||
|
// Set instance
|
||||||
|
Navigation.instance = this;
|
||||||
|
|
||||||
// Set history state
|
// Set history state
|
||||||
let url = window.location.pathname;
|
let url = window.location.pathname;
|
||||||
if (url == '/' || url == '') url = '/overall';
|
if (url == '/' || url == '') url = '/overall';
|
||||||
|
|||||||
Reference in New Issue
Block a user