Angularjs routeProvider adds *?* or %3F to URL with optional parameter -
I am trying to understand why will end with the URL I'm not sure what other information is that to help me get the right answer Should provide me, but please tell me. I do not think you have to give your alternative parameters your way Are correctly defined in I belive that you need to do it this way: Note that I removed ? I have an optional parameter in the or
% 3F URL
$ route provider. When ('/: Locale? /', {TemplateUrl: '/views/index.html', Controller: 'myController', Title: 'Title'}). Otherwise ({redirectTo: '/'}); // html5mode $ locationProvider.html5Mode (true); $ LocationProvider.hashPrefix ('!');
$ route provider and
routing Does not work with me, and I think the angle thinks that you are trying to experiment them, but rather define the alternative parameter
$ routePro Vider When ('/: Locale?', {TemplateUrl: '/views/index.html', Controller: 'myController', Title: 'Title'}). Otherwise ({redirectTo: '/'});
/ after your route and now I think the angular should be able to identify this route with optional parameters
Comments
Post a Comment