Reputation: 18699
I have some component, that I would like to reinitialise, so that it can trigger its constructor.
I was trying to do this with flag on *ngIf
, but it didn't reinitialized the component (investigated by adding console log to onDestroy and to constructor).
Any ideas?
Upvotes: 1
Views: 124
Reputation: 657268
Just move the code out of the constructor to a method and call the method from the constructor and from where you want to "reinitialize".
Upvotes: 2