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
Post a Comment