I see problem in my angular project, on some pages I didn't understand why request were made twice on page refresh. I noticed that the init
was called twice in my components. I thought to myself that this was going to be a complicated problem given the size of the project which contains a lot of lazy loading with outlet routing. But I noticed that even the app.component
init
was being called twice. Which I don't understand because it's the highest element in the hierarchy?
ngOnInit(): void {
this.translationService.init('customer-en');
console.log('appInit')
if (navigator.userAgent.includes("Window")) {
this.window = true;
}
}