0

I want to use multiselect drop down, to achieve this I have installed the angular2 multiselect drop down by the command

npm install angular2-multiselect-dropdown --save

also imported in app.module.ts as

import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown/angular2-multiselect-dropdown';

also included in as AngularMultiSelectModule in imports array.

But It's throwing error as

ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve 'angular2-multiselect dropdown/angular2-multiselect-dropdown' in 'D:\Works\frontend\src\app'

If anybody knows the solution please help. Thanks in advance.

HV Sharma
  • 4,891
  • 3
  • 15
  • 30

3 Answers3

2

you need to mention AngularMultiSelectModule import in your imports section which is in app.module.ts it will contain a library import as below import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown';

Pratik Hublikar
  • 176
  • 1
  • 8
  • try to highlight the keywords and be clear with the format it will help to reach out your answer for others – Agilanbu Dec 15 '18 at 05:48
2

You need to use this in module

import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown';

they changed it in recent versions so this

import { AngularMultiSelectModule } from 'angular2-multiselect-dropdown/angular2-multiselect-dropdown'; thorws an error

Nouman Bhatti
  • 1,341
  • 6
  • 28
  • 54
1

This repository has not been maintained since over 1 year ago. I think this is an incompatibility with Angular 6.

Maybe try out this on, if it suits your needs: https://www.npmjs.com/package/ng-multiselect-dropdown

pascalpuetz
  • 5,238
  • 1
  • 13
  • 26