1
0
Quellcode durchsuchen

Revert "Revert "Flatter loader code.""

Can use Promise directly now,
previous commit loads polyfill in the.js.

This reverts commit 511324bc
Herby Vojčík vor 4 Jahren
Ursprung
Commit
179b189839
1 geänderte Dateien mit 10 neuen und 10 gelöschten Zeilen
  1. 10 10
      grunt-init-project/root/index.html

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

@@ -25,17 +25,17 @@
 <!-- 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>