angular.js/test/directive/ngNonBindableSpec.js
Misko Hevery de9464c143 f(compile): boolean attributes too agresive
- compiler would rewrite boolean attributes on all elements. This is too aggressive and interferes with some third-party frameworks
2012-03-13 16:59:03 -07:00

21 lines
521 B
JavaScript

'use strict';
describe('ng-non-bindable', function() {
var element;
afterEach(function(){
dealoc(element);
});
it('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}}');
}));
});