Reputation: 302
Hi I am working on Angular 4. I have some functionalities (say functionality1, functionality2, ..., functionalityN) which is implemented in corresponding components(say component1, component2, ..., componentN). In my app I implemented notifications on the header. If some updations are occured, those are updated on notification, as usual. I provide routing to corresponding component as well.
Some of my components have individual view (i.e.,say component2 is not there, but component2/user1 , component2/user2, ..., component2/userN). I can access components from the notification list, but the issue I am facing is that, once I reach component2/user1 then nothing happens when try to access component2/user2, component2/user3, ... component2/userN. But I can access component2, component3, ..., componentN from component2/user1, component2/user2, ..., component2/userN.
What I understood is that issue is because component2/user1 , component2/user2, ..., component2/userN are just the views of single component component2. But there exists component2/user1 , component2/user2, ..., component2/userN and they are accessible from component1, component3, component4, ... componentN.
To access id based view of same component, from that component itself what should I do?
Hope some one can help
Upvotes: 0
Views: 1355
Reputation: 161
You can solve it by placing
this.initialize(this.id);
inside the subscibe method. The change is only visible there
Upvotes: 1