Skip to content

Commit

Permalink
indo
Browse files Browse the repository at this point in the history
  • Loading branch information
akaravi committed Nov 23, 2023
1 parent cb739bd commit 5e19891
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ntk-cms-web",
"version": "15.2.0829.1",
"version": "15.2.0902.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Event, NavigationEnd, NavigationError, NavigationStart, Router } from '@angular/router';
import { IApiCmsServerBase } from 'ntk-cms-api';
import { Observable, Subscription } from 'rxjs';
import { PublicHelper } from 'src/app/core/helpers/publicHelper';
Expand Down Expand Up @@ -37,8 +38,23 @@ export class PageTitleComponent implements OnInit, OnDestroy {
public dialog: MatDialog,
private cdr: ChangeDetectorRef,
private publicHelper: PublicHelper,
private router: Router
) {
this.router.events.subscribe((event: Event) => {
if (event instanceof NavigationStart) {
//do something on start activity

}
if (event instanceof NavigationError) {
// Handle error
console.error(event.error);
}

if (event instanceof NavigationEnd) {
//do something on end activity
this.contentService = null;
}
});
}

ngOnInit(): void {
Expand Down

0 comments on commit 5e19891

Please sign in to comment.