I got an angular 10 app that first start a login page. But before presenting the login fields, I need to check the presence of the web service and check if the app is currently in maintenance. So I need to call a function in my login.component.ts
file but when all the contents of the page will be loaded and displayed.
I tried this:
this.router.events.subscribe((e) => {
if (e instanceof NavigationEnd) {
this.NetworkTest();
}
});
in my constructor but, it's called a little too early and my main background image is not displayed. Any advice for me?
I also tried ngAfterViewInit with the same result.
Thanks
UDATE1: It is normal that in the NavigationEnd event the binding do not work? The properties is change in background, but the view is not updated.