-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: routerfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationfreq3: high
Milestone
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
I'm trying to use the new onSameUrlNavigation flag in 5.1.1, and while it does repeat the RouterEvent cycle, it doesn't trigger any lifecycle events in the routed components
Expected behavior
ideally if it's going to trigger a reload, it should re-initialize any routed components.
Minimal reproduction of the problem with instructions
imports: [RouterModule.forRoot([
{ path: "", component: HomeComponent, pathMatch: "full" },
{ path: "login", component: LoginComponent },
], { onSameUrlNavigation: "reload" })]
This configuration will not trigger lifecycle events in LoginComponent if there's a link to LoginComponent somewhere on the page
What is the motivation / use case for changing the behavior?
This flag was added to support refresh, but developers would still have to listen to the router event cycle to be able to refresh any components this way
Environment
Angular version: 5.1.1
Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ x] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ x] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
JMuhire, yurii-sorokin, desfarik, shreeshbhat, paj777 and 14 morefasfsfgs and SaidTorres3
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: routerfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationfreq3: high