I want to make routes to access user profiles and pages which made by users like belows.
http://example.com/username http://example.com/page_url
This should identify in the routing process by sending a request to backend API. How to gain this with AngularJS v1.4.8?
Current situation. (only working for usernames)
.when('/:username', {
templateUrl: 'app/views/profile.html',
controller: 'UserProfileController',
})
what I want to make
.when('/:username', {
templateUrl: select dynamically,
controller: select dynamically,
})
I have defined separate controllers and views for profile and page entities. HTML5 Mode also enabled
$locationProvider.html5Mode(true);