从离子1过渡到离子2,并且很好奇如何import * as Firebase from 'somewhere/foo/';使用他们的打字稿示例设置像firebase这样的东西.
bower是在离子2中安装js依赖项的标准方法,还是应该使用其他一些构建链/工具来添加像Firebase这样的东西?
我应该使用bower install来安装firebase库还是应该直接指向firebase cdn脚本源?
我应该使用typings来安装firebase打字稿定义吗?
这是firebase教程中的旧代码https://www.firebase.com/docs/web/libraries/ionic/guide.html
的index.html
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/1.2.0/angularfire.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
app.js
angular.module("starter", ["ionic", "firebase"])
Run Code Online (Sandbox Code Playgroud)
其中只包含对Firebase库的cdn引用.我们如何在离子2和打字稿中做到这一点