angular.js/test/directive/ngNonBindableSpec.js

21 lines
451 B
JavaScript
Raw Normal View History

'use strict';
2012-03-09 08:00:05 +00:00
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) {
2012-03-09 08:00:05 +00:00
element = $compile('<div ng-non-bindable><span ng-bind="name"></span></div>')($rootScope);
$rootScope.name = 'misko';
$rootScope.$digest();
expect(element.text()).toEqual('');
}));
});