Add callback for ng route commands for go
This commit is contained in:
parent
f79938a76d
commit
697af17462
@ -1,10 +1,20 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Router, RouterEvent } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: ['./app.component.scss'],
|
styleUrls: ['./app.component.scss'],
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
|
||||||
|
export class AppComponent implements OnInit{
|
||||||
|
constructor(private router: Router){ }
|
||||||
|
|
||||||
|
ngOnInit(){
|
||||||
|
document.addEventListener('GoChangeRoute_Callback', (event:any) => {
|
||||||
|
this.router.navigate([event.detail])
|
||||||
|
console.log("here")
|
||||||
|
})
|
||||||
|
}
|
||||||
title = 'go-web';
|
title = 'go-web';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user