#My angular component doesn't load when switching route.
1 messages · Page 1 of 1 (latest)
I don't understand why you are setting properties on your component instance after navigating. Navigation will cause the route to be switched, which will make the component unload, no? Even if not (and this component is outside of the router-outlet) then you should set isEditPage by reacting to route changes, not imperatively. And you are already doing that - so it seems redundant in many ways.
Please clarify what you mean by "can no longer to go ...". What happens if you try?
If i try to go to edits page after reloading on create page, url changes, but component doesn't load i think. I open devtools to check if html changes and it doesn't.
Hard to say without more info. Are there errors logged? A minimal reproduction would really help (see #how-to-get-help).
You can try enabling debug logging on the router (withDebugTracing()) and look at the router events logged to spot any issues.
there are no errors logged but I will try the steps you provided.
I enabled withDebugTracing(). however nothing seems like an error.
I will provide video in a second.
A video likely will not help. Please read #how-to-get-help