This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -538,10 +538,10 @@ angular.module('ui.bootstrap.modal', [])
538
538
ctrlInstance = $controller ( modalOptions . controller , ctrlLocals ) ;
539
539
if ( modalOptions . controllerAs ) {
540
540
if ( modalOptions . bindToController ) {
541
- angular . extend ( modalScope , ctrlInstance ) ;
542
- } else {
543
- modalScope [ modalOptions . controllerAs ] = ctrlInstance ;
541
+ angular . extend ( ctrlInstance , modalScope ) ;
544
542
}
543
+
544
+ modalScope [ modalOptions . controllerAs ] = ctrlInstance ;
545
545
}
546
546
}
547
547
Original file line number Diff line number Diff line change @@ -480,7 +480,7 @@ describe('$modal', function () {
480
480
} ) ;
481
481
482
482
it ( 'should allow usage of bindToController' , function ( ) {
483
- open ( { template : '<div>{{fromCtrl}} {{isModalInstance}}</div>' , controller : function ( $modalInstance ) {
483
+ open ( { template : '<div>{{test. fromCtrl}} {{test. isModalInstance}}</div>' , controller : function ( $modalInstance ) {
484
484
this . fromCtrl = 'Content from ctrl' ;
485
485
this . isModalInstance = angular . isObject ( $modalInstance ) && angular . isFunction ( $modalInstance . close ) ;
486
486
} , controllerAs : 'test' , bindToController : true } ) ;
You can’t perform that action at this time.
0 commit comments