I have a component where clicking on a button triggers the invocation of another component.
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();
}
}
Now, I want to execute a function within the abc-xyz component immediately upon its opening.
The JavaScript code for the component is as follows:
function taxReconciliationAlertController($scope) {
var model = this;
// Inside here i have written the function
function xyz(){
//some code here which returns data to html
}
}
Upon clicking the button in the first component, the intention is to call the xyz function, but it is proving to be challenging. Any assistance with resolving this issue would be greatly appreciated.