I was playing around with configuration, starting from instalatioin, then configuring systemjs.config.js and NgModule.
After hours spent i am giving up.
I have tried a lot of things, like:
setting packages to:
'ng2-typeahead' : { main: 'index.js', defaultExtension: 'js' }
or
'ng2-typeahead' : { main: 'lib/ng2-typeahead.js', defaultExtension: 'js' }
also seeting import in NgModules
import { Typeahead } from 'ng2-typeahead/src/ng2-typeahead';
import { Typeahead } from 'ng2-typeahead/lib/ng2-typeahead';
reading all issues
Well, nothing worked, time wasted
I was playing around with configuration, starting from instalatioin, then configuring systemjs.config.js and NgModule. After hours spent i am giving up.
package.json: { "typings": "^2.1.1", "ng2-typeahead": "^1.2.0" }
systemjs.config.js: map: { 'ng2-typeahead' : 'node_modules/ng2-typeahead' }, packages: { 'ng2-typeahead': { main: 'ng2-typeahead.js', defaultExtension: 'js' } }
import { Typeahead } from 'ng2-typeahead';
@NgModule({ declarations: [ Typeahead ], })
logs: Failed to load resource: the server responded with a status of 404 (Not Found) zone.js:522 Unhandled Promise rejection: (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/src/app/tmp/scripts/bootstrap.js Error: XHR error (404 Not Found) loading http://localhost:3000/src/app/tmp/scripts/bootstrap.js at XMLHttpRequest.wrapFn [as zonesymbolonreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:1242:29) []
at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:166:47) [ => ]
at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:420:38) []
Error loading http://localhost:3000/src/app/tmp/scripts/bootstrap.js ; Zone: ; Task: Promise.then ; Value: ZoneAwareError (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/src/app/tmp/scripts/bootstrap.js
Error: XHR error (404 Not Found) loading http://localhost:3000/src/app/tmp/scripts/bootstrap.js
at XMLHttpRequest.wrapFn [as zonesymbolonreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:1242:29) []
at Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:166:47) [ => ]
at XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:420:38) []
Error loading http://localhost:3000/src/app/tmp/scripts/bootstrap.js
I have tried a lot of things, like: setting packages to: 'ng2-typeahead' : { main: 'index.js', defaultExtension: 'js' } or 'ng2-typeahead' : { main: 'lib/ng2-typeahead.js', defaultExtension: 'js' }
also seeting import in NgModules import { Typeahead } from 'ng2-typeahead/src/ng2-typeahead'; import { Typeahead } from 'ng2-typeahead/lib/ng2-typeahead';
reading all issues Well, nothing worked, time wasted