当我想要创建一个空的(!) - 应用程序时,我很难知道应该使用哪些程序包/库。Angular2 npm包 - 我怎么知道要下载什么?
由开始的时候我在npmjs搜索angular2
我得到不想要的结果,我需要点击:
为了得到一个messy list,我不知道,如果一个模块可以另一个使用:
而且 - 即使我用@angular/core
JS,我不知道我应该包括或文件使用其他组件。
让我们举个例子 - 我想用HTTP
- The messy list doesn't contain any http
in there当我去docs - 我看到它从@angular/http
的,然后我再去npmjs并键入@angular/http
,然后我才能去使用unpkg.com
文件系统(使用unpkg.com的Chrome扩展)刚刚下载的js文件:
这是非常不友好。 (更不用说包中的变化经常发生 - 但互联网永远不会忘记)
我不想使用angular-cli和下载的东西,我不知道他们是什么做(如果我需要他们)。
于是我问:
问题
jQuery有一个download builder page,它允许您选择要下载 - 根据您需要的东西。我如何才能下载(仅用于angular2)我需要的组件(及其依赖项组件)?
例如 - 我一直在寻找的system.js
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/router/upgrade': 'npm:@angular/router/bundles/router-upgrade.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
'@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js',
// other libraries
'rxjs': 'npm:[email protected]',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
'ts': 'npm:[email protected]/lib/plugin.js',
'typescript': 'npm:[email protected]/lib/typescript.js',
},
at this basic angular 2 - plunker的地图部分plunker的作者是如何知道哪些软件包(除了common/core/http/router
包似乎合法的取) - 下载?
有人可以请澄清一下还是我完全错了?
为什么不使用现有的快速启动/种子项目? – jonrsharpe
@jonrsharpe作为一名高级开发人员 - 我不觉得有点奇怪,我想知道我在下载什么 - 尤其是从头开始的时候。并且我期望事情会更容易找到 - 除非 - 再次 - 我做这一切都是错误的。 –
那你为什么不从'@ angular/core'开始,看看你得到了什么错误? – jonrsharpe