Question

I'm building a route in angular.js like so:

$routeProvider
  .when('/ui/:id/foo/:netloc', {
    controller:'FooController',
    templateUrl:'/views/foo.html'
  })

The trouble is really simple - I want netloc to be able to be a dns or ip address. So sample routable paths might look like...

/ui/12345/foo/here.or.there.com/
/ui/54321/foo/10.24.36.48/

Unfortunately, while I found that it successfully routes this:

/ui/12345/food/here/

It will not route any path where the parameter contains a period. I though perhaps it was trying to do some sort of format discovery magic, so I tried this:

/ui/12345/foo/here.com.html

But that didn't work either. Any ideas on how to make this work?

Was it helpful?

Solution

Seems to most likely be a bug in your implementation. I tried it out locally and it worked fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top