Reputation: 263
How can I use the current controller in the modal configuration? I am in GestioneTrtController but this re-initialize my controller:
export class GestioneTrtController {
openModal() {
this.$modal.open({
templateUrl: '...,
controller: GestioneTrtController,
controllerAs: 'gestTrt',
bindToController: true
});
}
}
Upvotes: 0
Views: 381
Reputation: 197
Add current scope to your modal
export class GestioneTrtController {
openModal() {
this.$modal.open({
templateUrl: '...,
controller: GestioneTrtController,
controllerAs: 'gestTrt',
bindToController: true,
scope : $scope
});
}
}
Upvotes: 1