之前我使用 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中完成这个操作吗?
$location.path('xxurlxx')
这样的东西,但是我不确定参数,因为我不熟悉你正在尝试使用option
做什么。 - ewizard