ui-sref的参数传递

例如:路由配置如下:
1 $stateProvider.state('admin.userList', {
2     url: '/listUser?type&role',         //参数必须先在这边声明
3     templateUrl: requirejs.toUrl('../../user/user_list.html'),
4     resolve: {
5         module: lazyModule(['../../user/index'])
6     }
7 })

 


页面中:
<a ui-sref="admin.userList({type: 1, role: 2})" class="btn">按钮</a>
posted @ 2015-09-18 10:20  muwoo  阅读(5395)  评论(0编辑  收藏  举报