87,907
社区成员
发帖
与我相关
我的任务
分享
var confirm = $modal.open({
templateUrl: "modal/confirmModal.html",
controller: "confirmCtrl", // 怎么调用到?
resolve: {
data: function () {
return {
type: "confirm",
msg: "确认进行此次操作吗?"
};
}
}
})
(function () {
"use strict";
app.controller("confirmCtrl", function ($scope, data) {
$scope.message = data.msg;
if (data.type === "confirm") {
$scope.headStyle = {
"background-color": "red",
"color": "white"
};
$scope.title = "警告";
} else if (data.type === "info") {
$scope.headStyle = {
"background-color": "blue",
"color": "white"
};
$scope.title = "提示";
}
});
})();