Issue 1:
I'm submitting a ... (check one with "x")

[X ] bug report => search github for a similar issue or PR before submitting
[ ] feature 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 have a route like : http://localhost:4200/customers/50/invoices

customers - is a lazy loaded module

50 - is the :id parameter

invoices is the :module parameter

i have resolvers for the 50, and invoices routes.

if i use imperative navigation, to change to : http://localhost:4200/customers/60/invoices

only the resolver for the :id route is being called. the child resolver for :module is not called.

Expected behavior

when a route is changed, we might consider to run the resolvers of it's child routes, similar to Guards (??)

Minimal reproduction of the problem with instructions

here is the route definition for the customers lazy loaded module:

const routes: Routes = [

{ path: '',

component: CustomersComponent,

children: [

{ path: '', component: CustomersListComponent },

{ path: ':id', component: CustomersDetailsComponent,

resolve: {

xxx1: CustomerResolve1

}

,children: [

{ path: ':module', component: CustomersModuleDetailsComponent,

resolve: {

xxx2: CustomerResolve2

}

}

] }

]

}

];

the resolvers just output to the console.

if i enter the following url in the browser:

http://localhost:4200/customers/45/invoices

the 2 resolvers are executed.

if i press a button on the page that executes the following in my ts:

this.router.navigate(['customers','100','invoices']);

only the first resolver is executed !

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

win10, vscode, angular-cli

Angular version: 2.0.X

2.3.1

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 ]

Chrome

Issue 2:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Resolvers are not called when an upstream route param changes. This is wrong as the parent route param may obviously have significance. e.g

company/1/employee/2

company/2/employee/2

Employee 2 is not the same employee even though the param is 2 in both cases.

Expected behavior

The resolver would be called and could fetch the proper data which would then be made available to component as route data

Minimal reproduction of the problem with instructions

See https://github.com/slubowsky/resolve-issue

Run the app (ng serve). Click on the links to navigate. Going to / from "1 and 1" to / from either of the others results in resolver being called and message being logged to the console. Going between "1 and 2" and "2 and 2" does not. Resolver is never called. Component would not be updated.

What is the motivation / use case for changing the behavior?

Its currently broken. Cant keep component current with route using a resolver and route.data.

Thinking about this a bit more, can it be that the design is such that resolvers are only meant to be called before a component is shown for the first time (to prevent "blank" component), but once a component is showing, the resolver and route.data are never meant to be called and updated even if the route changes?

If this is the case, then I need to handle the exact same thing, getting route params and fetching the appropriate data, in two places. First get the params and fetch the data in the resolver and subscribe to ActivatedRoute.data for the first update, and then do the same thing again whenever the route changes.

Bigger problem is that I have no way of knowing the route changed (ActivatedRoute.params is not updated either). I suppose we could subscribe to router events and get snapshot or something on NavigationEnd but things are getting very messy, multiple paths instead of one, cut and pasted code, etc... I hope this is just a bug...

Plus it does seem to be called when this route segments parameters change so things are really getting strange. Lots of different scenarios that all should be exactly the same but instead are all different...

Please tell us about your environment:

Windows 10, Visual Studio Code, Angular-cli 1.0.0-beta.20-4

Angular version: 2.0.X

2.2.0

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 ]

Only tried Chrome

Language: [all | TypeScript X.X | ES6/7 | ES5]

Typescript 2.0.10

Node (for AoT issues): node --version =