如何将插件添加到离子2 plunker中



嗨,我有以下用于离子2的plunker。

离子2环境

我想将Angular 2 Flex布局(下面链接(添加到此plunker,以便我可以在home.html上访问它。我该怎么做?

Angular Flex布局

非常感谢。

我的索引看起来像:

<head>
    <script src="https://code.angularjs.org/tools/system.js"></script>
    <script src="https://code.angularjs.org/tools/typescript.js"></script>
    <script src="https://code.angularjs.org/2.0.0-beta.15/angular2-polyfills.js"></script>
    <script src="https://code.angularjs.org/2.0.0-beta.15/angular2.dev.js"></script>
    <script src="https://code.angularjs.org/2.0.0-beta.15/router.dev.js"></script>
    <script src="https://code.angularjs.org/2.0.0-beta.15/http.dev.js"></script>
    <script src="https://code.angularjs.org/2.0.0-beta.15/Rx.js"></script>
    <script src="config.js"></script>
    <script src="https://npmcdn.com/ionic-angular@2.0.0-beta.6/bundles/ionic.system.js"></script>
    <link href="https://npmcdn.com/ionic-angular@2.0.0-beta.6/bundles/ionic.ios.css" rel="stylesheet">
    <link href="style.css" rel="stylesheet">
  </head>
  <body>
    <!-- this Ionic's root component and where the app will load -->
    <ion-app></ion-app>
    <script>
      System.import('app.ts')
    </script>
  </body>
</html>

这个特定的plunker实际上在Angular和Ionic中都非常过时。不幸的是,似乎没有一个,因为2.0稳定,更不用说4.0当前分支了。

您可能会以某种方式使用它,但我认为这不是一个很好的测试/示例工具。

更新:我继续进行空白设置。您可以在这里看到它:http://plnkr.co/edit/y8r0mf?p=info

在这里,它是flex-layout运行

要添加插件,您必须将它们添加到SystemJS配置中,并带有umd的路径,例如:

'@angular/compiler': 'npm:@angular/compiler@4.1.2/bundles/compiler.umd.js',

这是打开包装版本的途径

希望有帮助!

最新更新