[英]Pass URL parameter to ui-sref
I need to pass query parameters to my URL 我需要将查询参数传递给我的URL
<a ui-sref="customers({foo:'bar'})">Link</a>
foo is not a state parameter and should resolve to a regular query parameter foo不是状态参数,应解析为常规查询参数
<a href="#/customers?foo=bar">Link</a>
How do I do that? 我怎么做?
In order to do this: 为此:
<a ui-sref="customers({foo:'bar'})">Link</a>
you would need something like this: 您将需要以下内容:
$stateProvider.state("customers", {url: "customers?foo", ...});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.