#Same route different uuid paramater
10 messages · Page 1 of 1 (latest)
What do you mean by "it doesn't load"?
My gues is that your route component doesn't handle the fact that parameters can change.
I mean by 'it doenst load' that when the second time same route different uuid i see in address bar its changed but not the view
Okay. Then what I said is probably the problem. Your route component must deal with the fact that route parameters can change. You have to subscribe or use withComponentInputBinding and properly handle the input changing. I would recommend the latter.
That's why ActivatedRoute#params is an observable. It will emit again when the parameters change.
Thanks! Do you prefer a good way?
I prefer withComponentInputBinding, because it makes more like any other Angular component. But if you need to load data in response to the params you might want to stick with using ActivatedRoute#params so you can use switchMap to load the data every time.
Cant seem to fix it.. i must use @Input uuid? and set with ComponentInputBinding to. true.