I've created a skeleton structure for my app in Angular 9. The skeleton code initializes in ngAfterViewInit() hook.
ngAfterViewInit() {
this.showSpinner = false;
this.interval = setInterval(() => {
this.domLoaded = true;
}, 5000);
}
But every time I load this page (or come again after navigating from any other route) it still Fires the event to show the skeleton. I want the skeleton only show on the first Load of app.
I have also used ngAfterContentInit() but that didn't work