Isolate scopes DO have a $$phase as property while not-isolate scope don`t.
see 
https://github.com/angular/angular.js/blob/master/src/ng/rootScope.jsline:178
and line:125(Scope defination).

$rootScope is initialized in line 1037 with no other post-process, if I not
missing something.



On Mon, Mar 17, 2014 at 4:02 PM, Ivan S <[email protected]> wrote:

> 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 a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/pN-a3pR8UAc/unsubscribe.
> To unsubscribe from this group and all its topics, 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.
>

-- 
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