From 1de82283dbf1bed2fc04700584dc1123b1e159fe Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 15 Jul 2010 13:35:00 -0700 Subject: proper handlig of $element in filters --- test/directivesSpec.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/directivesSpec.js b/test/directivesSpec.js index b6ccf764..fb1e868a 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -73,11 +73,14 @@ describe("directives", function(){ }); it('should have $element set to current bind element', function(){ - angularFilter.myFilter = function(){ - this.$element.text('HELLO'); + var innerText; + angularFilter.myFilter = function(text){ + innerText = this.$element.text(); + return text; }; - var scope = compile('