Closed wertzui closed 2 years ago
I think this is rather desired behavior, because the actual RESTworldListViewComponent
is only initialized once and afterwards only the two pathParam inputs change.
So I think what you're looking for is rather the ngOnChanges lifecycle hook, that fires whenever one of your component inputs changes.
I need to call a method after all the
@Input()
s have been set.I tried using
ngOnInit()
to do that. However it is only called, after the app has navigated to the wrapped component for the first time.In my
AppModule
, I have imported theRouterModule
like this:My
AppRoutes
look like this:Now I navigate to
/list/foo/bar
. Everything works fine andngOnInit()
is called.Now I navigate to
/list/foo2/bar2
ngOnInit()
is not called.Is it possible to have the Angular LifeCycle hooks being called after the second navigation happened? If not, is there any other possibility to get notified, after all the
@Input()
s have been set? Please note that I cannot just check if all have a value, since it is expected that some may beundefined
.Thanks in advance