Open thany opened 7 years ago
Here we have the ugliest workaround to get $onInit to execute anyway:
.controller("FooController", ["bar", function(bar) {
this.$onInit = function() {
this.$onInit.executed = true;
// ...
};
// ...
!this.$onInit.executed && this.$onInit();
}]);
Might be a nice option if this were fixed, wouldn't it? :)
Any news if this will be fixed anytime soon?
What version of ng-dialog are you using? 1.1.0
What version of AngularJS are you using? 1.6.4
Please describe the issue I've made a dialog with its own controller, with
controllerAs
andbindToController
:In the controller:
What did you expect to happen?
$onInit
should be executed - I should see two console logs.What actually happened?
$onInit
is not executed - I see only the second console log.