url - angularjs routes parameters issue -



url - angularjs routes parameters issue -

how can parameter such url in angularjs controller:

http://localhost:53315/employee/{parameter}#/info

here's 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 in advance help!

i think you'll have parse $location.absurl() it.

angularjs url parameters

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -