File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5944,6 +5944,30 @@ describe('$compile', function() {
59445944 } ) ) ;
59455945
59465946
5947+ // https://github.com/angular/angular.js/issues/15833
5948+ it ( 'should work with ng-model inputs' , function ( ) {
5949+ var componentScope ;
5950+
5951+ module ( function ( $compileProvider ) {
5952+ $compileProvider . directive ( 'undi' , function ( ) {
5953+ return {
5954+ restrict : 'A' ,
5955+ scope : {
5956+ undi : '<'
5957+ } ,
5958+ link : function ( $scope ) { componentScope = $scope ; }
5959+ } ;
5960+ } ) ;
5961+ } ) ;
5962+
5963+ inject ( function ( $compile , $rootScope ) {
5964+ element = $compile ( '<form name="f" undi="[f.i]"><input name="i" ng-model="a"/></form>' ) ( $rootScope ) ;
5965+ $rootScope . $apply ( ) ;
5966+ expect ( componentScope . undi ) . toBeDefined ( ) ;
5967+ } ) ;
5968+ } ) ;
5969+
5970+
59475971 it ( 'should not complain when the isolated scope changes' , inject ( function ( ) {
59485972 compile ( '<div><span my-component ow-ref="{name: name}">' ) ;
59495973
You can’t perform that action at this time.
0 commit comments