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

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -