Browse Source

Flatter loader code.

Herby Vojčík 5 years ago
parent
commit
8a49deb688
1 changed files with 11 additions and 11 deletions
  1. 11 11
      grunt-init-project/root/index.html

+ 11 - 11
grunt-init-project/root/index.html

@@ -22,18 +22,18 @@
 <!-- EXAMPLE APP END -->
 <script type='text/javascript'>
     var global = typeof global === "undefined" ? window : global || window;
-    require(['app'], function (amberPromise) {
-        amberPromise.then(function (amber) {
-            amber.initialize({
-                //used for all new packages in IDE
-                'transport.defaultAmdNamespace': "{%= namespace %}"
-            }).then(function () {
-                require(["amber-ide-starter-dialog"], function (dlg) {
-                    dlg.start();
-                });
-                amber.globals.{%= name %}._start();
-            });
+    new Promise(function (resolve, reject) {
+        require(['app'], resolve, reject);
+    }).then(function (amber) {
+        return amber.initialize({
+            //used for all new packages in IDE
+            'transport.defaultAmdNamespace': "{%= namespace %}"
         });
+    }).then(function () {
+        require(["amber-ide-starter-dialog"], function (dlg) {
+            dlg.start();
+        });
+        amber.globals.{%= name %}._start();
     });
 </script>
 </body>