【发布时间】:2018-03-04 11:00:10
【问题描述】:
我希望使用ng4-material-dropdown 并按照从我项目的根文件夹中调用npm install ng4-material-dropdown --save 的指示安装包。虽然我可以确认此文件夹存在于 /node-components 中,但将其导入我的 app.module.ts 会引发错误。
导入import { Ng4DropdownModule } from 'ng4-material-dropdown';
错误
错误:(SystemJS) XHR 错误 (404 Not Found) 正在加载 http://localhost:3000/ng4-material-dropdown patchProperty/desc.set/wrapFn@http://localhost:3000/node_modules/zone.js/dist/zone.js:1055:30 ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17 Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28 ZoneTask/this.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:486:28 加载 http://localhost:3000/ng4-material-dropdown 时出错 “ng4-material-dropdown”来自http://localhost:3000/app/app.module.js 堆栈跟踪:(SystemJS)XHR 错误(404 Not Found)正在加载 http://localhost:3000/ng4-material-dropdown patchProperty/desc.set/wrapFn@http://localhost:3000/node_modules/zone.js/dist/zone.js:1055:30 ZoneDelegate.prototype.invokeTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:424:17 Zone.prototype.runTask@http://localhost:3000/node_modules/zone.js/dist/zone.js:191:28 ZoneTask/this.invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:486:28 加载 http://localhost:3000/ng4-material-dropdown 时出错 来自http://localhost:3000/app/app.module.js的“ng4-material-dropdown”
这可能是一个非常幼稚的错误,但我这辈子都想不通。
【问题讨论】:
标签: angular import components