From 31cd5803102ba93f8b93cd5304aea4ade50f96ab Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 13 Mar 2012 13:49:05 -0700 Subject: fix(ng-non-bindable): increase priority to 1000 - increase ng-non-bindable prioirity to 1000 so that it prevents attribute interpolation on same level. --- src/directive/ngNonBindable.js | 3 ++- test/directive/ngNonBindableSpec.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/directive/ngNonBindable.js b/src/directive/ngNonBindable.js index 217618cc..2e9faa5a 100644 --- a/src/directive/ngNonBindable.js +++ b/src/directive/ngNonBindable.js @@ -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 @@ */ -var ngNonBindableDirective = ngDirective({ terminal: true }); +var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 }); diff --git a/test/directive/ngNonBindableSpec.js b/test/directive/ngNonBindableSpec.js index 8b745364..4f69528b 100644 --- a/test/directive/ngNonBindableSpec.js +++ b/test/directive/ngNonBindableSpec.js @@ -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('
')($rootScope); + element = $compile('
')($rootScope); $rootScope.name = 'misko'; $rootScope.$digest(); expect(element.text()).toEqual(''); + expect(element.attr('text')).toEqual('{{name}}'); })); }); -- cgit v1.2.3