【发布时间】:2015-11-17 10:01:38
【问题描述】:
我有这个状态定义:
.state("workPlan.list", {
url: "MainPage",
templateUrl: "app/workPlan/templates/workPlanList.tmpl.html",
controller: "workPlanListController",
controllerAs: "list",
resolve: {
workPlans: ["workPlanServise", workPlanServiseResolver],
inspectionAuthority: ["lookupService", inspectionAuthorityResolver],
clients: ["lookupService", ClientsResolver]
}
})
当前路径是:
/cities#/MainPage
我需要在 URL 中传递一些数据:
'Table':'Clients'
'Key':'Name'
'Value':'ClientId'
'Table':'Dates'
'Key':'Desc'
'Value':'DateId'
'Table':'Sites'
'Key':'SiteName'
'Value':'SiteId'
我需要在 URL 路径中发送上面的数据:
/cities#/MainPage?{'Table':'Clients','Key':'Name','Value':'ClientId'}{...}{...}
然后在状态定义中我需要在解析函数中使用它。
所以我的问题是是否可以以上述格式在路径中发送数据,以及如何在解析函数中访问它。
【问题讨论】:
标签: angularjs angular-ui-router