You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The stock Angular router passes all search parameters through, not just those that were predefined. It also allows changing (search) parameters without reloading the 'state.' Together, this allows for independence of (search) parameters, and some really interesting implementations accordingly.
The angular-ui router could, with one tweak, have an awesome jump in functionality.
The current nesting of parent/child states is excellent. But what is missed is that we ALMOST have nested sibling views too, but not quite.
Use case:
Imagine we have a search box and list of results in the left column of some state. Maybe it's a list of users, for example. On the right hand side we have the currently selected record's details (the user details in this example, and maybe scrolled down a bit).
Ideally, we could modify the search parameters, reloading the left column (sub-state) without affecting the sibling right column substate (maybe we've scrolled down the selected user's details column, and don't want to lose that position. Likewise, we could click on another user in the list, loading that users details in the right substate, without affecting the left substate (the list - we don't want to lose the position we've scrolled to, or bother with reloading data or rebuilding views that are already in place).
We could kill several birds with one stone if we can flag parameters as passive.
Example.
'/users/:subsection/::leftcol/::id'
All parameters are used to define the state, but only the active :parameters force a reload of the whole state. The passive ::parameters do not cause a reload of the whole state (remember - this 'whole' state might be the child of another - it's not necessary the top most level), but substates can follow those passive parameters to reload their particular sub views.
We already have most of the infrastructure. We can use the current subviews as substates, just by marking which passive parameters that substate tracks:
.when('/users/:subsection/::substateParam1/::substateParam2', {
someSubView: {
controller: 'SubViewController',
templateUrl: '/subViewController.hmtl',
tracks: ['substateParam1'] // default would be tracks all - i.e. any param change causes reload
},
someSubviewTwo: {
controller: 'SubViewController',
templateUrl: '/subViewController2.hmtl',
tracks: ['substateParam2']
}
})����
Like this sub views/sub states would function completely independently. It would also dovetail in nicely with optional parameters.
Any thoughts?
The text was updated successfully, but these errors were encountered:
The stock Angular router passes all search parameters through, not just those that were predefined. It also allows changing (search) parameters without reloading the 'state.' Together, this allows for independence of (search) parameters, and some really interesting implementations accordingly.
The angular-ui router could, with one tweak, have an awesome jump in functionality.
The current nesting of parent/child states is excellent. But what is missed is that we ALMOST have nested sibling views too, but not quite.
Use case:
Imagine we have a search box and list of results in the left column of some state. Maybe it's a list of users, for example. On the right hand side we have the currently selected record's details (the user details in this example, and maybe scrolled down a bit).
Ideally, we could modify the search parameters, reloading the left column (sub-state) without affecting the sibling right column substate (maybe we've scrolled down the selected user's details column, and don't want to lose that position. Likewise, we could click on another user in the list, loading that users details in the right substate, without affecting the left substate (the list - we don't want to lose the position we've scrolled to, or bother with reloading data or rebuilding views that are already in place).
We could kill several birds with one stone if we can flag parameters as passive.
Example.
'/users/:subsection/::leftcol/::id'
All parameters are used to define the state, but only the active :parameters force a reload of the whole state. The passive ::parameters do not cause a reload of the whole state (remember - this 'whole' state might be the child of another - it's not necessary the top most level), but substates can follow those passive parameters to reload their particular sub views.
We already have most of the infrastructure. We can use the current subviews as substates, just by marking which passive parameters that substate tracks:
Like this sub views/sub states would function completely independently. It would also dovetail in nicely with optional parameters.
Any thoughts?
The text was updated successfully, but these errors were encountered: