Last active
December 17, 2015 00:09
-
-
Save benschw/5518392 to your computer and use it in GitHub Desktop.
$stateParams Service and GET parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If you had a url on your state of: | |
url: '/users/:id/details/{type}/{repeat:[0-9]+}?from&to' | |
// Then you navigated your browser to: | |
'/users/123/details//0' | |
// Your $stateParams object would be | |
{ id:'123', type:'', repeat:'0' } | |
// Then you navigated your browser to: | |
'/users/123/details/default/0?from=there&to=here' | |
// Your $stateParams object would be | |
{ id:'123', type:'default', repeat:'0', from='there', to='here' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment