From bbd0677ca3a048357e9b6c37d9c4544be9b0603c Mon Sep 17 00:00:00 2001 From: Damiano Date: Thu, 23 Apr 2015 09:19:07 +0200 Subject: [PATCH] added controllerAs property to modal service settings --- angular-ui-bootstrap/angular-ui-bootstrap-tests.ts | 1 + angular-ui-bootstrap/angular-ui-bootstrap.d.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts index 608591b58..c9883f86e 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap-tests.ts @@ -131,6 +131,7 @@ testApp.controller('TestCtrl', ( var modalInstance = $modal.open({ backdrop: 'static', controller: 'ModalTestCtrl', + controllerAs: 'vm', keyboard: true, resolve: { items: ()=> { diff --git a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts index c803f3600..c3675e7a9 100644 --- a/angular-ui-bootstrap/angular-ui-bootstrap.d.ts +++ b/angular-ui-bootstrap/angular-ui-bootstrap.d.ts @@ -237,6 +237,12 @@ declare module angular.ui.bootstrap { */ controller?: any; + /** + * an alternative to the controller-as syntax, matching the API of directive definitions. + * Requires the controller option to be provided as well + */ + controllerAs?: string; + /** * members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes */