diff options
author | Valerio Virgillito | 2012-02-02 18:28:29 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-02 18:28:29 -0800 |
commit | 197ae04f7677b7a5890a589ba572e750a229c502 (patch) | |
tree | aaec555d69da7259bf9f5bf846363bc4aa68a2c1 /user-document-templates/montage-application-cloud | |
parent | 7ccadc20c96539988290999982d7483e013732f9 (diff) | |
download | ninja-197ae04f7677b7a5890a589ba572e750a229c502.tar.gz |
Using async to load the required component.
Diffstat (limited to 'user-document-templates/montage-application-cloud')
-rw-r--r-- | user-document-templates/montage-application-cloud/main.reel/main.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/user-document-templates/montage-application-cloud/main.reel/main.js b/user-document-templates/montage-application-cloud/main.reel/main.js index 036d6c24..90262073 100644 --- a/user-document-templates/montage-application-cloud/main.reel/main.js +++ b/user-document-templates/montage-application-cloud/main.reel/main.js | |||
@@ -45,7 +45,14 @@ exports.Main = Montage.create(Component, { | |||
45 | 45 | ||
46 | var button = require.async(stro) | 46 | var button = require.async(stro) |
47 | .then(function (button) { | 47 | .then(function (button) { |
48 | callback(); | 48 | var btIns = button["Button"]; |
49 | |||
50 | btIns.element = containerElement; | ||
51 | btIns.deserializedFromTemplate(); | ||
52 | |||
53 | btIns.needsDraw = true; | ||
54 | btIns.label = "Button"; | ||
55 | callback(btIns, containerElement); | ||
49 | }) | 56 | }) |
50 | .end(); | 57 | .end(); |
51 | 58 | ||