【发布时间】:2015-06-26 01:25:45
【问题描述】:
我正在使用bootstrap modal
Controller.js -
$scope.open = function() {
var modalInstance = $modal.open({
animation: true,
templateUrl: 'views/template.html',
controller: 'controller2',
resolve: {
items: function() {
return $scope.values;
}
}
});
modalInstance.result.then(function(values) {
$scope.new_value = values;
}, function() {
});
};
我不想创建新控制器,因为模式应该显示当前控制器中不断变化的值。如果我模态在同一个控制器中,我应该通过什么来代替 controller2?
【问题讨论】:
标签: angularjs angular-ui-bootstrap bootstrap-modal