From d74ef497defa77c92873b09b7b6f4e19ae175779 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sat, 23 Oct 2010 13:42:11 -0700 Subject: Fix for getting into recursive $eval on scope. Close #59 It sort of worked since the browser would throw stack too deep exception and the angular would then print the error to console. So as long as you did not have console open you would not notice this as an error. --- test/widgetsSpec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index df0941c0..2d1aef1a 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -497,6 +497,17 @@ describe("widget", function(){ expect(element.text()).toEqual(''); }); + + it('should allow this for scope', function(){ + var element = jqLite(''); + var scope = angular.compile(element); + scope.url = 'myUrl'; + scope.$inject('$xhr.cache').data.myUrl = {value:'{{c=c+1}}'}; + scope.$init(); + // This should not be 4, but to fix this properly + // we need to have real events on the scopes. + expect(element.text()).toEqual('4'); + }); }); describe('a', function() { -- cgit v1.2.3