我有一个组件,当我点击一个按钮时,我会调用另一个组件。
model.alert = function () {
modalInstance = $uibModal.open({
template: '<abc-xyz return-value="model" on-cancel="Cancel()"></abc-xyz>',
scope: modalScope,
backdrop: 'static',
windowClass: 'callrecord-popup'
});
modalScope.Cancel = function () {
modalInstance.close();
}
}现在,我想一打开就调用一个函数int,即abc组件。
组件的js是:
function taxReconciliationAlertController($scope) {
var model = this;
// Inside here i have written the function
function xyz(){
//some code here which returns data to html
}
}一旦我单击第一个组件中的按钮,它就应该调用这个xyz函数,但我无法调用它。有人能帮我吗?
发布于 2017-09-16 15:34:00
在xyz()函数定义下面的abc组件的控制器中使用xyz()调用函数。
https://stackoverflow.com/questions/46253648
复制相似问题