angularjs - How to allow static url routes to exist on a dynamic url namespace -
angularjs - How to allow static url routes to exist on a dynamic url namespace -
so have 2 routes in angular-ui-router, 1 static , 1 dynamic
$stateprovider .state('home', { url: '/home', templateurl: 'home.html' }) .state('profile', { url: '/:username', templateurl: 'profile.html' }) ; how can create sure 1 not clash other?
====
edit:
now found out 'profile' clashes root:
.state('root', { url: '/', templateurl: 'root.html' }) ; navigating '/' displays profile.html instead of root.html. navigating '/windy' shows profile.html correctly.
angularjs angular-ui angular-ui-router
Comments
Post a Comment