AngularJS $ lcoation.search() - 不区分大小写?

时间:2016-02-03 12:22:46

标签: javascript angularjs url-parameters

我正在使用AngularJS Trigger a build on each check-in = true Branch filter: +:refs/changes/* 函数来检索url params,我希望有一种简单的方法可以使这种情况不敏感。通过我所做的研究,我找不到任何解决方案。

请考虑以下事项:

$location.search()

这是我的代码:

http://mytestapp.com/signup?type=development

使用上面的网址,输出为var type = $location.search().type console.log(type); 使用此网址(development),输出为http://mytestapp.com/signup?Type=development(请注意undefined个字母。)

如何使函数区不敏感?

0 个答案:

没有答案