Monday, 15 September 2014

javascript - Routing in Angular JS with Multiple Slashes (1.2.x) -



javascript - Routing in Angular JS with Multiple Slashes (1.2.x) -

i have injected ngroute angular app, , routing works when paths 1 level deep, ie. have single slash.

in app.js:

app.config(['$routeprovider', function($routeprovider) { $routeprovider .when('/', { templateurl: 'login.html', controller: 'loginctrl' }) .when('/guestlist', { templateurl: 'guestlist.html', controller: 'guestlistctrl' }) .when('/event/apply', { templateurl: 'apply-to-event.html', controller: 'eventctrl' }) .when('/event/confirmation', { templateurl: 'apply-to-event-confirmation.html', controller: 'eventctrl' }) .when('/event', { templateurl: 'event.html', controller: 'eventctrl' }) .otherwise({ redirectto: '/' }); }]);

the routes not work /event/apply , /event/confirmation, go straight /. however, /event , /guestlist, example, work.

any ideas much appreciated,

javascript angularjs routing url-routing angular-routing

No comments:

Post a Comment