mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
style(Scope): rename child scope type from Child to ChildScope
This change makes it easier to debug angular, especiall when dealing with heap snapshots and hunting for memory leaks.
This commit is contained in:
parent
bb36bc7edf
commit
7401c70718
1 changed files with 4 additions and 4 deletions
|
|
@ -172,7 +172,7 @@ function $RootScopeProvider(){
|
|||
*
|
||||
*/
|
||||
$new: function(isolate) {
|
||||
var Child,
|
||||
var ChildScope,
|
||||
child;
|
||||
|
||||
if (isolate) {
|
||||
|
|
@ -182,11 +182,11 @@ function $RootScopeProvider(){
|
|||
child.$$asyncQueue = this.$$asyncQueue;
|
||||
child.$$postDigestQueue = this.$$postDigestQueue;
|
||||
} else {
|
||||
Child = function() {}; // should be anonymous; This is so that when the minifier munges
|
||||
ChildScope = function() {}; // should be anonymous; This is so that when the minifier munges
|
||||
// the name it does not become random set of chars. This will then show up as class
|
||||
// name in the debugger.
|
||||
Child.prototype = this;
|
||||
child = new Child();
|
||||
ChildScope.prototype = this;
|
||||
child = new ChildScope();
|
||||
child.$id = nextUid();
|
||||
}
|
||||
child['this'] = child;
|
||||
|
|
|
|||
Loading…
Reference in a new issue