【发布时间】:2018-02-25 11:26:53
【问题描述】:
我有一个组件,在单击按钮时我正在调用另一个组件。
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();
}
}
现在我想在 abc-xyz 组件打开后立即调用它。
组件的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 函数,但我无法调用它。有人可以帮我解决这个问题吗?
【问题讨论】:
标签: javascript angularjs components