Reputation: 780
How I can get parameter from such url in angularjs controller:
http://localhost:53315/Employee/{parameter}#/info
Here's my angularjs code:
$routeProvider
.when('/info', {
controller: 'UserCtrl',
templateUrl: baseTemplateUrl + 'info.html'
});
.controller('UserCtrl', ['$rootScope', '$scope', '$location', '$routeParams', 'User', function ($rootScope, $scope, $location, $routeParams, User) {
$rootScope.user = User.get({ id: $routeParams.id });
Thank you in advance for any help!
Upvotes: 0
Views: 60