我想尝试使用angular-cli(https://github.com/angular/angular-cli)创建一个Angular 2应用程序,然后使用ng2-material(https://github.com/justindujardin/ng2-material)用于UI组件.但我只是不明白我必须包含ng2-material库以便使用它.
我创建了一个项目,ng new myproject然后我启动了服务器ng serve并打开了网页,结果很好.下一步,我安装了ng2-material npm install ng2-material --save.然后我添加MATERIAL_PROVIDERS到angular的bootstrap,如下所示https://github.com/AngularShowcase/angular2-seed-ng2-material/blob/master/app/bootstrap.ts.
这导致GET http://localhost:4200/ng2-material/all 404 (Not Found)Web浏览器中出现错误消息,我无法弄清楚如何摆脱它.
angular-cli似乎正在做一些事情来创建一个文件dist夹,其中index.html中使用的一些节点模块最终进入,但我看不到在哪里或如何配置.
运用
"@angular/cli": "^1.0.0"
Run Code Online (Sandbox Code Playgroud)
@angular/cli 忽略 tsconfig.json
该项目编译很好的编辑/删除 tsconfig.json
这是为什么?