javascript - 如何从 CDN 使用 Angular 2(或 4)框架

标签 javascript angular

<分区>

在 Angular 1.x 中,我们可以选择使用 CDN (https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js) 链接到 Angular 框架。 Angular 2 中是否提供该选项?

最佳答案

您可以尝试像 unpkg 这样的 CDN

加载系统 JS 和 ES6:

<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>

Example with plnkr

Example with JSFiddle

关于javascript - 如何从 CDN 使用 Angular 2(或 4)框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43868701/

相关文章:

javascript - 检查给定 ID 是否存在于 Javascript 中的嵌套对象中的有效方法

javascript - 是否可以使用 Python 和 JS/CSS 中的 GUI 构建程序?如何整合语言?

java - 比较两个 HTML 源代码并显示视觉差异

javascript - 如何使用 jQuery 在网页上移动元素?

从模块中导出的 Angular 组件在另一个模块中不可用

Angular 应用程序无法使用 GitHub 操作 ('Cannot find module' 构建)

javascript - 坐标到 wkt OpenLayers

javascript - 选择颜色为 :lightGreen in CSS using jQuery 的元素

javascript - 取消选中一个复选框,取消选中所有其他复选框不工作

javascript - 当只有一个选项时,Angular 自动选择 Mat-Select