【发布时间】:2015-10-17 03:40:14
【问题描述】:
http://jsfiddle.net/dwmkerr/8MVLJ/
我正在尝试从上面的示例中进行实验。我的问题是模态似乎无法从调用它的 $scope 中读取任何内容。
Javascript
$scope.sampleTest = "SAMPLE TEXT"; // additional code
$scope.show = function() {
ModalService.showModal({
templateUrl: 'modal.html',
controller: "ModalController"
}).then(function(modal) {
modal.element.modal();
modal.close.then(function(result) {
$scope.message = "You said " + result;
});
});
};
HTML
<p>It's your call...{{sampleText}}</p>
模态仅显示“这是您的电话...”而不是“这是您的电话... SAMPLE TEXT”
我在这里有什么遗漏吗?
【问题讨论】:
标签: angularjs modal-dialog parameter-passing