使用AngularJS未定义查询字符串值 [英] Query string value got undefined using AngularJS
本文介绍了使用AngularJS未定义查询字符串值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
正面临从查询字符串中检索值,如何解决这个问题?
url:
Hi
am facing retrieving the value from query string, how to solve this?
url :
http://localhost:2369/Forms/Users/EDITUsers.htm?UserID=1
这里使用代码:
here am using code:
var App = angular.module('EditApp', []);
App.controller("EditController", function ($scope, $http, $location) {
var QueryStrValue = $location.search();
alert("Querystr value: " + QueryStrValue.UserID);
});
推荐答案
范围,
http,
location){
var QueryStrValue =
location) { var QueryStrValue =
这篇关于使用AngularJS未定义查询字符串值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文