ui-router icon indicating copy to clipboard operation
ui-router copied to clipboard

URL Param int interpretation broken

Open maruf89 opened this issue 11 years ago • 3 comments

I wish I had the time to throw a plunkr together but I have a deadline and no time.

Anyways based of the documentation using the URL: example.com/events/2405 and this config, it will go the route, run the controller, but redirect to the app's $urlRouterProvider.otherwise('/404')

{
    name: 'single'
    url: '/events/{eID:int}'      // <-- redirecting to apps $urlRouterProvider.otherwise
    controller: 'EventSingleCtrl as Event'
    templateUrl: 'views/events/single/Template'
}

if I change the url to /events/:eID or /events/{eID:[0-9]+} then it works fine without redirecting

Using v0.2.10

maruf89 avatar Jan 10 '15 13:01 maruf89

@maruf89 Im not sure what the problem is here. if you use /events/:eID with that url you will have a $stateParam.eID available to you in the controller

zlegein avatar Jan 16 '15 21:01 zlegein

@maruf89 did you try with latest? 0.2.13 has the only working typed parameters code

christopherthielen avatar Jan 21 '15 19:01 christopherthielen

Closing due to no provided plunk and no response. Please open a new issue with a plunk and we'll get it looked at, thanks.

nateabele avatar Mar 27 '15 17:03 nateabele