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
In 0.2.11 the url params test/:id were parsed to numbers in some cases (it did for ui-sref, but not for href or direct links). in 0.2.12 this behaviour changed to being parsed always to string. Is this by purpose?
$stateProvider.state('contacts.detail',{url: "/contacts/:contactId",templateUrl: 'contacts.detail.html',controller: function($stateParams){// If we got here from a url of /contacts/42expect($stateParams).toBe({contactId: 42});}})
and fail w/ 0.2.12 then.
The text was updated successfully, but these errors were encountered:
If you want int parameters, now you can declare it and always get ints (not sometimes-ints-sometimes-strings)
$stateProvider
.state('contacts.detail', {
url: "/contacts/{contactId:int}",
templateUrl: 'contacts.detail.html',
controller: function ($stateParams) {
// If we got here from a url of /contacts/42
expect($stateParams).toBe({contactId: 42});
}
})
Hello there,
In 0.2.11 the url params test/:id were parsed to numbers in some cases (it did for ui-sref, but not for href or direct links). in 0.2.12 this behaviour changed to being parsed always to string. Is this by purpose?
0.2.12 plnkr
0.2.11 plnkr
Our tests are written like described in the wiki (https://github.com/angular-ui/ui-router/wiki/URL-Routing#stateparams-service):
and fail w/ 0.2.12 then.
The text was updated successfully, but these errors were encountered: