This article describes the operation of parameter jumping and parameter analysis of AngularJS page. Share it for your reference, as follows:
Page jumps with parameters
$ = function () { var hre = '/weixinCt/main#/upload_topic_start?uid=' + $ + '&orgcode=' + $; = hre; }
After the url, add ?, and then directly bring parameters.
Parameter analysis
Controller declares that the injection of $location is to be increased
('loginCtrl', function ($scope, $http, $interval, $cookies, $location, userService) { var absUrl = $(); function UrlSearch() { var name, value; var str = ; //Get the entire address bar var num = ("?"); str = (num + 1); //Get all parameters (start [, length ] var arr = ("&"); //Put each parameter into the array for (var i = 0; i < ; i++) { num = arr[i].indexOf("="); if (num > 0) { name = arr[i].substring(0, num); value = arr[i].substr(num + 1); this[name] = value; } } } var Request = new UrlSearch(); //Instantiation alert(" = "+ ); })
From the Request, the value obtained through the key value is the parameter with the url, and you can use it directly.
For more information about AngularJS, readers who are interested in view the topic of this site:Summary of AngularJS command operation skills》、《AngularJS Introduction and Advanced Tutorial"and"AngularJS MVC architecture summary》
I hope this article will be helpful to everyone's AngularJS programming.