mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 23:40:23 +00:00
fix(ng-non-bindable): increase priority to 1000
- increase ng-non-bindable prioirity to 1000 so that it prevents attribute interpolation on same level.
This commit is contained in:
parent
d34f3bc7a6
commit
31cd580310
2 changed files with 5 additions and 3 deletions
|
|
@ -3,6 +3,7 @@
|
|||
/**
|
||||
* @ngdoc directive
|
||||
* @name angular.module.ng.$compileProvider.directive.ng-non-bindable
|
||||
* @priority 1000
|
||||
*
|
||||
* @description
|
||||
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
|
||||
|
|
@ -29,4 +30,4 @@
|
|||
</doc:scenario>
|
||||
</doc:example>
|
||||
*/
|
||||
var ngNonBindableDirective = ngDirective({ terminal: true });
|
||||
var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
|
||||
|
|
|
|||
|
|
@ -10,11 +10,12 @@ describe('ng-non-bindable', function() {
|
|||
});
|
||||
|
||||
|
||||
it('should prevent compilation of the owning element and its children',
|
||||
iit('should prevent compilation of the owning element and its children',
|
||||
inject(function($rootScope, $compile) {
|
||||
element = $compile('<div ng-non-bindable><span ng-bind="name"></span></div>')($rootScope);
|
||||
element = $compile('<div ng-non-bindable text="{{name}}"><span ng-bind="name"></span></div>')($rootScope);
|
||||
$rootScope.name = 'misko';
|
||||
$rootScope.$digest();
|
||||
expect(element.text()).toEqual('');
|
||||
expect(element.attr('text')).toEqual('{{name}}');
|
||||
}));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue