javascript - 如何使用 ng-boilerplate 包含 CDN 托管的库?

标签 javascript gruntjs firebase ngboilerplate

我想将 CDN 托管的 Firebase Javascript 文件添加到基于 ng-boilerplate 的应用程序中。

我尝试将其添加到 build.config.js 中的 vendor_files 中,但它未包含在输出 index.html 中 - 也许是因为它无法在本地找到该文件?

如果我直接将应用程序添加到 index.html 模板,该应用程序就可以工作,但这不干净并且会破坏测试。

有没有办法将外部文件添加到 ng-boilerplate 或修改 Gruntfile 来添加它们?

最佳答案

根据文档,

the vendor_files.js property holds files to be automatically concatenated and minified with our project source files.

所以这是行不通的。根据 Kato 的链接,v0.4 仍在考虑中。

关于javascript - 如何使用 ng-boilerplate 包含 CDN 托管的库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19113652/

相关文章:

javascript - 如何在同一按钮位置循环切换多个按钮

javascript - 如何使用 Bower 从 AngularJS I18n 文件中包含特定的语言环境?

javascript - jshint 'esversion: 6' 问题

ios - 在 Firebase 中,检索到的数据不会从 .observeEventType 方法中获取

ios - 从我的 NodeJS 应用程序发送推送通知消息不起作用

javascript - 如何根据可见高度显示元素溢出计数?

javascript - 删除 Javascript 生成的 HTML

firebase - Firebase 是否会影响生产应用程序的性能

javascript - ngRoute、ng-view 和代码重复的最佳实践

javascript - 何时使用 yeoman angularjs 运行测试