angular.js/test/directive/ngNonBindableSpec.js
Misko Hevery 31cd580310 fix(ng-non-bindable): increase priority to 1000
- increase ng-non-bindable prioirity to 1000 so that it prevents attribute interpolation on same level.
2012-03-13 16:58:36 -07:00

21 lines
522 B
JavaScript

'use strict';
describe('ng-non-bindable', function() {
var element;
afterEach(function(){
dealoc(element);
});
iit('should prevent compilation of the owning element and its children',
inject(function($rootScope, $compile) {
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}}');
}));
});