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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -