-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
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
URL param with type date and default value null breaks #3816
Comments
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had This does not mean that the issue is invalid. Valid issues Thank you for your contributions. |
I'm getting the same error message with the same setup. The workaround I'm using is to use $stateProvider.state('page', {
url: '/page?{somedate:date}',
templateUrl: './page.html',
dynamic: true,
params: {
somedate: {
value: undefined
}
}
}); Using The null problem aside, notice that the Hence, if date-time is involve, best leave it as a string-type, the alternative workaround -- dropping $stateProvider.state('page', {
url: '/page?somedate',
templateUrl: './page.html',
dynamic: true,
params: {
somedate: {
value: undefined
}
}
}); |
This is a (check one box):
My version of UI-Router is: (type version)
1.0.27
Bug Report
Current Behavior:
A URL param declaration with
type: 'date'
and defaultvalue: null
throws:Cannot read property 'getFullYear' of null
Expected Behavior:
It should work and set null as default value for this param
Link to Plunker or stackblitz that reproduces the issue:
( if you want a response to your issue, provide a way to reproduce it )
( http://bit.ly/UIR-Plunk1 )
( https://stackblitz.com/edit/ui-router-angularjs )
The text was updated successfully, but these errors were encountered: