我正在使用 angular版本6 ,并试图将 angular2-multiselect-dropdown 集成到我的应用中。在遵循此参考中的使用步骤之后,尝试运行该应用程序时: http://cuppalabs.github.io/components/multiselectDropdown/ https://www.npmjs.com/package/angular2-multiselect-dropdown
我收到如下错误:
Date: 2019-05-02T07:41:56.573Z
Hash: 8b7ca08bfd8ad516f706
Time: 27855ms
chunk {main} main.js, main.js.map (main) 4.99 MB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 473 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 158 kB [rendered]
chunk {styles} styles.js, styles.js.map (styles) 255 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 7.43 MB [initial] [rendered]
ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve "angular2-multiselect-
dropdown/angular2-multiselect-dropdown" in
"D:\Projects\Gosnow\src\gosnow_admin\src\app"
i 「wdm」: Failed to compile.
我还尝试使用angular2-multiselect-dropdown: 4.2.2 和angular2-multiselect-dropdown: 4.2.0 来得到相同的错误。
请问对此有什么帮助吗?
答案 0 :(得分:0)
http://cuppalabs.github.io/components/multiselectDropdown/#Usage此处的文档中的import语句不正确。
import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown/angular2-multiselect-dropdown';
应该是
import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown';