-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Router data doesn't update with ** matching #12603
Comments
vsavkin
added a commit
to vsavkin/angular
that referenced
this issue
Oct 28, 2016
vsavkin
added a commit
to vsavkin/angular
that referenced
this issue
Oct 28, 2016
3 tasks
vsavkin
added a commit
to vsavkin/angular
that referenced
this issue
Nov 3, 2016
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm submitting a ... (check one with "x")
Current behavior
I tried to set up a route with something like:
{ path: '**', component: Foobar, resolve: {'myData': MyResolver} },
To allow URLs like
/foo/bar/baz/path/to/file.txt
And it all works fine on the first load - the resolved data derived from the full path is available with:
route: ActivatedRoute;
route.data.forEach((data) => {
console.log(data['myData']);
});
But then if the path is changed, the resolver is not called to recalculate the data, and the forEach body is not called again.
Expected behavior
The body of the forEach would be called any time the url changes.
Minimal reproduction of the problem with instructions
https://plnkr.co/edit/qc0dWTNzQOxgUnwWhlr5
What is the motivation / use case for changing the behavior?
I want to support fetching of things based on arbitrary paths during routing.
Please tell us about your environment:
Plunker with Chrome linux
Angular version: 2.0.X
2.0.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
Language: [all | TypeScript X.X | ES6/7 | ES5]
all
Node (for AoT issues):
node --version
=The text was updated successfully, but these errors were encountered: