From 197ae04f7677b7a5890a589ba572e750a229c502 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 2 Feb 2012 18:28:29 -0800 Subject: Using async to load the required component. --- .../montage-application-cloud/main.reel/main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'user-document-templates/montage-application-cloud/main.reel/main.js') 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, { var button = require.async(stro) .then(function (button) { - callback(); + var btIns = button["Button"]; + + btIns.element = containerElement; + btIns.deserializedFromTemplate(); + + btIns.needsDraw = true; + btIns.label = "Button"; + callback(btIns, containerElement); }) .end(); -- cgit v1.2.3