网上查看的方式更倾向于bootstrap,方式是加上:data-backdrop = “static” 这个属性,但是在angularJs项目中,数据源并不是这样获取的,这种方法同样不适合。
经过深入查找,发现写的方式:
在打开模态框的方法中写:
(加上 backdrop :“static”,这个属性即可)
$scope.edit = function () {
_internalCreateModal({
backdrop:'static',
template:'views/pop/model-edit.html',
scope:$scope
},$modal,$scope)
}
// _internalCreateModal是封装的指令,用来自动关闭本页面和转换路径