Suppose we have these nested rules:
Where the level 0 rule selects the View that shows a list of records in a grid, while the par parameter selects which record to show in a detail area. Suppose also that each grid row has a detail link that once clicked shows the record bound to the row in the detail area. How to implement the row link?
Since each router remembers the context of all parameters of the current route, it is enough to specify the value of the par parameter that selects the record to be shown in the detail area:
Where id is the property of the model bound to the grid row that contains the record principal key.
The action binding is smart enough to build the complete url.
When the user clicks a detail link, since the section of the url that matches "#/nested/:view" doesn't change, the action function of the 0 level view doesn't fire, so the view isn't reloaded. Only the action function associated to "/:par?" fires again and loads the new record in the detail area.
In general, in case of nested rules: