This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1037,7 +1037,7 @@ function $CompileProvider($provide) {
10371037 interpolateFn = $interpolate ( attr [ name ] , true ) ;
10381038 }
10391039
1040- attr [ name ] = undefined ;
1040+ attr [ name ] = interpolateFn ( scope ) ;
10411041 ( $$observers [ name ] || ( $$observers [ name ] = [ ] ) ) . $$inter = true ;
10421042 ( attr . $$observers && attr . $$observers [ name ] . $$scope || scope ) .
10431043 $watch ( interpolateFn , function interpolateFnWatchAction ( value ) {
Original file line number Diff line number Diff line change @@ -1381,9 +1381,10 @@ describe('$compile', function() {
13811381 } ) ) ;
13821382
13831383
1384- it ( 'should set interpolated attrs to undefined' , inject ( function ( $rootScope , $compile ) {
1384+ it ( 'should set interpolated attrs to initial interpolation value' , inject ( function ( $rootScope , $compile ) {
1385+ $rootScope . whatever = 'test value' ;
13851386 $compile ( '<div some-attr="{{whatever}}" observer></div>' ) ( $rootScope ) ;
1386- expect ( directiveAttrs . someAttr ) . toBeUndefined ( ) ;
1387+ expect ( directiveAttrs . someAttr ) . toBe ( $rootScope . whatever ) ;
13871388 } ) ) ;
13881389
13891390
You can’t perform that action at this time.
0 commit comments