0

I am using angular-2-dropdown-multiselect

I have installed this lib using

npm install angular-2-dropdown-multiselect

then added the entry in system.config.js under map

'angular-2-dropdown-multiselect': 'node_modules/angular-2-dropdown-multiselect',

and under packages

'angular-2-dropdown-multiselect': {
        main: 'index.js',
        defaultExtension: 'js'
  }

but still this is showing

GET http://localhost:3000/node_modules/angular-2-dropdown-multiselect/index.js 404 (Not Found)
scheduleTask @ zone.js:1645
ZoneDelegate.scheduleTask @ zone.js:255
Zone.scheduleMacroTask @ zone.js:168
(anonymous) @ zone.js:1669
send @ VM519:3
fetchTextFromURL @ system.src.js:1051
(anonymous) @ system.src.js:1778
ZoneAwarePromise @ zone.js:536
(anonymous) @ system.src.js:1777
(anonymous) @ system.src.js:2806
(anonymous) @ system.src.js:3384
(anonymous) @ system.src.js:3707
(anonymous) @ system.src.js:4099
(anonymous) @ system.src.js:4562
(anonymous) @ system.src.js:4831
(anonymous) @ system.src.js:407
ZoneDelegate.invoke @ zone.js:242
Zone.run @ zone.js:113
(anonymous) @ zone.js:520
ZoneDelegate.invokeTask @ zone.js:275
Zone.runTask @ zone.js:151
drainMicroTaskQueue @ zone.js:418
ZoneTask.invoke @ zone.js:349
2017-03-09 15:15:11.555 (index):23 Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/node_modules/angular-2-dropdown-multiselect/index.js
    Error: XHR error (404 Not Found) loading http://localhost:3000/node_modules/angular-2-dropdown-multiselect/index.js
        at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:889:29) [<root>]
        at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:151:47) [<root> => <root>]
        at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:345:33) [<root>]
    Error loading http://localhost:3000/node_modules/angular-2-dropdown-multiselect/index.js as "angular-2-dropdown-multiselect" from http://localhost:3000/app/app.module.js
        at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:889:29) [<root>]
        at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:151:47) [<root> => <root>]
        at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:345:33) [<root>]
    Error loading http://localhost:3000/node_modules/angular-2-dropdown-multiselect/index.js as "angular-2-dropdown-multiselect" from http://localhost:3000/app/app.module.js
(anonymous) @ (index):23
ZoneDelegate.invoke @ zone.js:242
Zone.run @ zone.js:113
(anonymous) @ zone.js:520
ZoneDelegate.invokeTask @ zone.js:275
Zone.runTask @ zone.js:151
drainMicroTaskQueue @ zone.js:418
ZoneTask.invoke @ zone.js:349
2017-03-09 15:15:12.647 zone.js:1645 GET http://localhost:3000/node_modules/angular-2-dropdown-multiselect/index.js 404 (Not Found)

Am I missing something?

1
  • should you use angular-2-dropdown-multiselect/src/multiselect-dropdown.js directly for there is no index.js in the package. Commented Mar 9, 2017 at 10:01

1 Answer 1

1

Try

'angular-2-dropdown-multiselect': 'node_modules/angular-2-dropdown-multiselect/src/multiselect-dropdown.js',

Plunker Example

Sign up to request clarification or add additional context in comments.

2 Comments

Dependencies Bootstrap CSS 3 or 4, Font Awesome (optional) github.com/softsimon/angular-2-dropdown-multiselect
how can I set width? I am trying style property with width:100%. but not working :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.