diff options
| author | Misko Hevery | 2010-02-04 15:12:34 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-02-04 15:12:34 -0800 |
| commit | 5eb440c22bb87b1d69c14193954620b9f1cec023 (patch) | |
| tree | 4ecbf10abc61bf4a04e268233a46c678f73542e8 /src | |
| parent | 251fab40291183c8e50ea0fabd23c30341cc72d3 (diff) | |
| download | angular.js-5eb440c22bb87b1d69c14193954620b9f1cec023.tar.bz2 | |
lazy load the status dom
Diffstat (limited to 'src')
| -rw-r--r-- | src/Widgets.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Widgets.js b/src/Widgets.js index 01877128..5e844ae0 100644 --- a/src/Widgets.js +++ b/src/Widgets.js @@ -779,8 +779,8 @@ PopUp.prototype = { function Status(body) { - this.loader = body.append(Status.DOM).find("#ng-loading"); this.requestCount = 0; + this.body = body; }; Status.DOM ='<div id="ng-spacer"></div><div id="ng-loading">loading....</div>'; @@ -788,7 +788,7 @@ Status.DOM ='<div id="ng-spacer"></div><div id="ng-loading">loading....</div>'; Status.prototype = { beginRequest: function () { if (this.requestCount === 0) { - this.loader.show(); + (this.loader = this.loader || this.body.append(Status.DOM).find("#ng-loading")).show(); } this.requestCount++; }, |
