In fact, $$phase IS a property of the $rootScope object.

You can access it in child scopes since they prototypically inherit from 
the rootScope.

If you try to access it on isolated scope (like a directive with scope: 
{}), you will get "undefined".

On Sunday, March 16, 2014 5:35:27 PM UTC+4, Zizon Qiu wrote:
>
> hi,
>  Recently,I come across the well known error:
>
>>
>> Error: [$rootScope:inprog] $digest already in progress' 
>
>   
>
>  With some source reading,It seems that,$rootScope.$$phase is the direct 
> cause.
>
>  $$phase can be found at every Scope object,but only referenced/accessed 
> by $rootScope.
>
>  So,I wonder why this singular property be presented in every Scope object 
> but not private to $rootScope?
>  
>  If $$phase is set in per-scope way,not stick to $rootScope,in my case the 
> error mentioned above can be avoid.
>  although,it do can be `avoid` in some other way.
>
>  but,what I asking,is not how to avoid it,but why $$phase designed this 
> way(not private to $rootScope)?
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to