angularjs - Angular routeProvider named groups not working? -
this code. i'm trying match url. if replace /*path /:something/:somethingelse , visit /asdf/asdf work, won't match @ using /*path. i've been able find indicates proper syntax.
i'm using angular 1.2.18, , have tried bleeding border beta release well.
does know might running here?
edit: here's fiddle showing not working: http://jsfiddle.net/2hyk9/
window.myapp = myapp = angular.module 'myapp', ['ngresource', 'ngsanitize', 'nganimate', 'ngroute', 'ngtouch'] myapp.config ['$locationprovider', ($locationprovider) -> $locationprovider.html5mode true ] myapp.config ['$routeprovider', ($routeprovider, $routeparams, $location) -> $routeprovider. when("/*path", { templateurl: (path) -> console.log path homecoming '/pages/asdf.html' , controller: 'browsecontroller', reloadonsearch: false }) ]
i think right syntax :path*
.
from angular documentation:
path can contain named groups starting colon , ending star: e.g.:name*. characters eagerly stored in $routeparams under given name when route matches.
angularjs
No comments:
Post a Comment