-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: defaults$1 is not a constructor at new TagInputComponent (ngx-chips.js:1642) #634
TypeError: defaults$1 is not a constructor at new TagInputComponent (ngx-chips.js:1642) #634
Comments
Post some code, or better an online reproduction |
module.ts
componet.ts ...
component.html
... |
I'd try importing modules as in https://github.com/Gbuomprisco/ngx-chips/blob/master/demo/app.ts#L19 |
Thanks for the help on this. I found the problem. It had to actually do with my typescript. In my file tsconfig.app.json i had the target as es6 when it should have been es5. Found the answer when I figured it may be my compiler.
|
Fixes TypeError "defaults$2 is not a constructor" Calling the function directly instead of with `new` (which doesn't work in ES6 mode) returns the exact same structure in both modes. Closes Gbuomprisco#832 Closes Gbuomprisco#744 Closes Gbuomprisco#634
PLEASE MAKE SURE THAT:
I'm submitting a ... (check one with "x")
Current behavior
triggers the error.
<tag-input [(ngModel)]='items'>
core.js:1353 ERROR Error: Uncaught (in promise): TypeError: defaults$1 is not a constructor
TypeError: defaults$1 is not a constructor
at new TagInputComponent (ngx-chips.js:1642) <--
at createClass (core.js:10384)
at createDirectiveInstance (core.js:10227)
at createViewNodes (core.js:11687)
at callViewAction (core.js:12121)
at execComponentViewsAction (core.js:12030)
at createViewNodes (core.js:11715)
at createRootView (core.js:11576)
at callWithDebugContext (core.js:12942)
at Object.debugCreateRootView [as createRootView] (core.js:12278)
at new TagInputComponent (ngx-chips.js:1642)
at createClass (core.js:10384)
at createDirectiveInstance (core.js:10227)
at createViewNodes (core.js:11687)
at callViewAction (core.js:12121)
at execComponentViewsAction (core.js:12030)
at createViewNodes (core.js:11715)
at createRootView (core.js:11576)
at callWithDebugContext (core.js:12942)
at Object.debugCreateRootView [as createRootView] (core.js:12278)
at resolvePromise (zone.js:783)
at resolvePromise (zone.js:754)
at zone.js:831
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)
at Object.onInvokeTask (core.js:3983)
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:191)
at drainMicroTaskQueue (zone.js:595)
at
defaultErrorLogger @ core.js:1353
handleError @ core.js:1410
next @ core.js:4536
schedulerFn.__isAsync @ core.js:3688
__tryOrUnsub @ Subscriber.js:227
next @ Subscriber.js:175
_next @ Subscriber.js:118
next @ Subscriber.js:82
next @ Subject.js:45
emit @ core.js:3674
zone.runOutsideAngular @ core.js:4014
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run @ zone.js:141
runOutsideAngular @ core.js:3941
onHandleError @ core.js:4014
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runGuarded @ zone.js:157
_loop_1 @ zone.js:666
api.microtaskDrainDone @ zone.js:675
drainMicroTaskQueue @ zone.js:603
Promise resolved (async)
scheduleMicroTask @ zone.js:578
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:413
onScheduleTask @ zone.js:300
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:235
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.scheduleMicroTask @ zone.js:255
scheduleResolveOrReject @ zone.js:829
resolvePromise @ zone.js:778
(anonymous) @ zone.js:709
webpackJsonpCallback @ bootstrap 86724afc4c9e93f4e1f7:21
(anonymous) @ blog.module.chunk.js:1
Expected behavior
Minimal reproduction of the problem with instructions (if applicable)
Followed the default steps. Imports confirmed.
What do you use to build your app?. Please specify the version
Webpack
Angular version:
5.1
ngx-chips version:
1.6.1
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
The text was updated successfully, but these errors were encountered: