Skip to content

Commit 31cd580

Browse files
committed
fix(ng-non-bindable): increase priority to 1000
- increase ng-non-bindable prioirity to 1000 so that it prevents attribute interpolation on same level.
1 parent d34f3bc commit 31cd580

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/directive/ngNonBindable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/**
44
* @ngdoc directive
55
* @name angular.module.ng.$compileProvider.directive.ng-non-bindable
6+
* @priority 1000
67
*
78
* @description
89
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
@@ -29,4 +30,4 @@
2930
</doc:scenario>
3031
</doc:example>
3132
*/
32-
var ngNonBindableDirective = ngDirective({ terminal: true });
33+
var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });

test/directive/ngNonBindableSpec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ describe('ng-non-bindable', function() {
1010
});
1111

1212

13-
it('should prevent compilation of the owning element and its children',
13+
iit('should prevent compilation of the owning element and its children',
1414
inject(function($rootScope, $compile) {
15-
element = $compile('<div ng-non-bindable><span ng-bind="name"></span></div>')($rootScope);
15+
element = $compile('<div ng-non-bindable text="{{name}}"><span ng-bind="name"></span></div>')($rootScope);
1616
$rootScope.name = 'misko';
1717
$rootScope.$digest();
1818
expect(element.text()).toEqual('');
19+
expect(element.attr('text')).toEqual('{{name}}');
1920
}));
2021
});

0 commit comments

Comments
 (0)