gpt4 book ai didi

arrays - Angular - umd.js 与 rx.umd.js

转载 作者:太空狗 更新时间:2023-10-29 17:55:25 25 4
gpt4 key购买 nike

按照 Angular 教程,可以看到:

<script src="node_modules/angular2/bundles/angular2.umd.js"></script>

用于https://angular.io/docs/js/latest/guide/forms.html同时,

<script src="node_modules/rxjs/bundles/Rx.umd.js"></script>

用于https://angular.io/docs/js/latest/quickstart.html

有人可以解释或指向解释何时调用哪个 JS 文件的文档。提前致谢

最佳答案

UMD 包适用于使用 ES5 编写的用户以及对 ngUpgrade 感兴趣的用户。

有一个名为 overview.md 的文件位于 https://code.angularjs.org/2.0.0-beta.0/ ,你可以在那里检查它的用途是什么。此文件还不是 http://angular.io 的一部分但它很可能会包含在未来。

引用该文档的一部分

ES5 and ngUpgrade users

ES5 users and AngularJS 1.x users interested in the ngUpgrade path can take advantage of the bundles in the UMD format. Those are coarse-grained bundles that combine many barrels in one final file.

Warning: bundles in the UMD format are not "additive". A single application should use only one bundle from the above list.

在您的情况下,您需要 Rx.umd.js(如果需要,也可以是缩小版本)和 Angular2 UMD 包之一。

在文档本身中有一个包含每个内容的列表/表格。

更新

overview 文件,虽然它在网站上还不可用,但可以在存储库中找到。检查overview.md .

关于arrays - Angular - umd.js 与 rx.umd.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34452634/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com