File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5944,6 +5944,30 @@ describe('$compile', function() {
5944
5944
} ) ) ;
5945
5945
5946
5946
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
+
5947
5971
it ( 'should not complain when the isolated scope changes' , inject ( function ( ) {
5948
5972
compile ( '<div><span my-component ow-ref="{name: name}">' ) ;
5949
5973
You can’t perform that action at this time.
0 commit comments