How to do url(string) cocatenation in angular routing.
Please refer the below snippet to understand my question.
app.config(['$routeProvider', '$location'], function($routeProvider) {
when('/', {
templateUrl: '/AlbumsList.html',
controller: 'a1Ctrl'
}).
when('/albums/:albumName', {
templateUrl: 'AlbumsList.html',
controller: 'b1Ctrl'
})
})
app.controller('a1Ctrl', function($scope, $http) {
$scope.albums = function() {
//ajax getting data from server
}
})
app.controller('b1Ctrl', function($scope, $routeProviders) {
$scope.album = $routeProviders.albumName;
$http({
//same ajax function as above getting data from server for the nes sub album
})
})
<div>
<ul>
<li ng-repeat="album in albums">
<a href="/albums/{{album.name}}">{{album.name}}</a>
</li>
</ul>
</div>
Now when page is loaded, the first routing path is executed, the page is displayed as below

Now when I click the on say Hindi Albums url in browser changes to /albums/hindi and html is rendered as below

Currently url in browser is getting updated to /localhost:8080/albums/himesh Now my need is to update the url in browser to /localhost:8080/albums/hindi/himesh
So how to do such string concatenation using Angular routing.
Thanking You.