We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
angular -v : 1.5.8 ui-router -v: 0.3.2
$stateProvider.state({ url: '/list?{aParam:int}', ...... }); $state.go('/list', {aParam: 13}) works $state.go('/list', {aParam: undefined}) works $state.go('/list', {aParam: null}) throws error
Is this expected behavior? If it is, could you direct me to docs or guides. If it is not, i would like to provide a plunker.
The text was updated successfully, but these errors were encountered:
If anything, I would expect that to throw an error about the param value being invalid.
That's a bug, thanks for reporting it!
Here's the problem:
"int": { encode: valToString, decode: function(val) { return parseInt(val, 10); }, is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; }, pattern: /\d+/ },
We should check if val !== null in the is() function
!== null
is()
Sorry, something went wrong.
This is also a bug in 1.0, so tagging appropriately. After the fix goes into 1.0 it should be backported to legacy for the 0.4.0 release.
Closed by ui-router/core@aa551e4 in 1.0
fix(urlMatcherFactory): Check for null in int.is()
61728d7
Fixes message: Cannot read property 'toString' of null Closes #3197
Fixed by 61728d7 in 0.4.0
No branches or pull requests
angular -v : 1.5.8
ui-router -v: 0.3.2
$stateProvider.state({
url: '/list?{aParam:int}',
......
});
$state.go('/list', {aParam: 13}) works
$state.go('/list', {aParam: undefined}) works
$state.go('/list', {aParam: null}) throws error
Is this expected behavior? If it is, could you direct me to docs or guides. If it is not, i would like to provide a plunker.
The text was updated successfully, but these errors were encountered: