在我使用 JQuery 之前,我使用它来发送带有参数的 URL
window.location = myUrl + $.param({"paramName" : "ok","anotherParam":"hello"});
但对于 angularjS 来说,这并不以同样的方式工作
$scope.myButton = function() {
$window.location.open = myUrl + $.param({"paramName" : "ok","anotherParam":"hello"});
};//Error: $ is not defined
谁能帮我如何在 angularJs 中做到这一点
Angular 中有一个内置的序列化器,它模仿 $.param():$httpParamSerializer QLike https://docs.angularjs.org/api/ng/service/%24httpParamSerializerJQLike
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)