js
NiDialog.open({
windowClass: '',
backdrop: 'static',
keyboard: false,
templateUrl: '/static/tpl/admin/dialogs/editPromotion.tpl',
controller: 'editPromotionCtrl',
resolve: {
promotion: function () {
return data.result[1]
},
editDatasource:function(){
return data.result[2]
},
promotionUsers:function(){
return data.result[3]
}
}
}); 通过resolve可以将值传到model页面 将传递的值在对应的controller注入就可以啦
.controller('editPromotionCtrl', ['$scope','$rootScope','NgTableParams','NiHttp','NiDialog','$q','$parse','$filter','promotion','editDatasource','promotionUsers', function ($scope, $rootScope,NgTableParams,NiHttp,NiDialog,$q,$parse,$filter,promotion,editDatasource,promotionUsers) {
}]);