javascript - AngularJS: Dynamic URL Prefix -
i have large angular app lives @ url so:
http://myangularapp.com/app/index.html#/
the url intend on giving out need name injected url 1 site support multiple users.
so, without modifying directory structure, i'd do:
http://myangularapp.com/app/bob/index.html#/
and also:
http://myangularapp.com/app/harry/index.html#/
all controllers , functionality ideally stay same.
super stumped on one!
use $routeprovider
service. can define urls go, so.
$routeprovider. when('/app/foo/bar/what/about/bob', { templateurl: 'app/bob/index.html', <---directory , url don't have match controller: 'bobcontroller' }). when('/app/harry', { ... })
Comments
Post a Comment