路由页面(注意这里要在路由上添加一个参数用于传递数据,不然在页面跳转的时候会filter)
.state(“home.workpiece”,{ // 跳转前的页面
url:"/workpiece",
views: {
home: {
templateUrl: prefix + “project/workpiece.html”,
controller: “workpieceCtrl”
}
}
})
.state(“home.workpieceDetail”,{ //跳转后的页面
url:"/workpieceDetail?workpieceList",
views: {
home: {
templateUrl: prefix + “project/workpiece_detail.html”,
controller: “workpieceDetailCtrl”
}
}
})
也可以将参数放在params中
.state(“home.workpieceDetail”,{
url:"/workpieceDetail",
views: {
home: {
templateUrl: prefix + “project/workpiece_detail.html”,
controller: “workpieceDetailCtrl”
}
},
params: {workpieceList:null}
})
angular1223123321132打算