File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ export class AppHeaderComponent implements OnInit {
1717 ) { }
1818
1919 ngOnInit ( ) : void {
20- this . router . events . subscribe ( ( event ) => {
21- if ( event instanceof NavigationEnd ) {
22- let currentUrl = this . router . url ;
23- // Only allow relative paths
24- if ( currentUrl . startsWith ( '/' ) ) {
25- this . url = currentUrl ;
26- } else {
27- this . url = '/' ;
20+ this . router . events . subscribe ( ( event ) => {
21+ if ( event instanceof NavigationEnd ) {
22+ let currentUrl = this . router . url ;
23+ // Only allow relative paths
24+ if ( currentUrl . startsWith ( '/' ) ) {
25+ this . url = currentUrl ;
26+ } else {
27+ this . url = '/' ;
28+ }
2829 }
29- }
30- } ) ;
31- }
30+ } ) ;
31+ }
3232 get isLoggedIn ( ) : Observable < boolean > {
3333 return this . accountService . isLoggedIn ( ) ;
3434 }
You can’t perform that action at this time.
0 commit comments