javascript - get url parameter query via injector -



javascript - get url parameter query via injector -

need direct access object can reveal info query parameter passed.

would prefer way hold of object injector $http object

var $http = angular.injector(["ng"]).get("$http");

what's direct/short/concise/eloquent way query variables without going through controller.

alternatively other options please.

here illustration query parameter in app.js illustration .when('/catagory/:catagoryid/:catagoryname', { templateurl:'partials/bookofparticularcatagory.html', controller:'bookofparticularcatagorycontroller' }) in controller app.controller("bookofparticularcatagorycontroller",function($routeparams,$scope,$http){ $scope.catagoryid= $routeparams.catagoryid; $scope.catagoryname= $routeparams.catagoryname;

javascript angularjs

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -