i checked the demo code, and used this componnet in my app (based on ng2-admin) but ijm getting this trace `core.es5.js:1084 ERROR Error: Uncaught (in promise): Error: No value accessor for form control with unspecified name attribute
Error: No value accessor for form control with unspecified name attribute
at _throwError (forms.es5.js:1918)
at setUpControl (forms.es5.js:1828)
at NgModel._setUpStandalone (forms.es5.js:4402)
at NgModel._setUpControl (forms.es5.js:4388)
at NgModel.ngOnChanges (forms.es5.js:4319)
at checkAndUpdateDirectiveInline (core.es5.js:10812)
at checkAndUpdateNodeInline (core.es5.js:12238)
at checkAndUpdateNode (core.es5.js:12177)
at prodCheckAndUpdateNode (core.es5.js:12704)
at Object.View_UserStatisticsComponent_0.co [as updateDirectives] (UserStatisticsComponent.ngfactory.js:296)
at _throwError (forms.es5.js:1918)
at setUpControl (forms.es5.js:1828)
at NgModel._setUpStandalone (forms.es5.js:4402)
at NgModel._setUpControl (forms.es5.js:4388)
at NgModel.ngOnChanges (forms.es5.js:4319)
at checkAndUpdateDirectiveInline (core.es5.js:10812)
at checkAndUpdateNodeInline (core.es5.js:12238)
at checkAndUpdateNode (core.es5.js:12177)
at prodCheckAndUpdateNode (core.es5.js:12704)
at Object.View_UserStatisticsComponent_0.co [as updateDirectives] (UserStatisticsComponent.ngfactory.js:296)
at resolvePromise (zone.js:769)
at resolvePromise (zone.js:740)
at zone.js:817
at ZoneDelegate.webpackJsonp.1056.ZoneDelegate.invokeTask (zone.js:424)
at Object.onInvokeTask (core.es5.js:4140)
at ZoneDelegate.webpackJsonp.1056.ZoneDelegate.invokeTask (zone.js:423)
at Zone.webpackJsonp.1056.Zone.runTask (zone.js:191)
at drainMicroTaskQueue (zone.js:584)
at HTMLAnchorElement.ZoneTask.invoke (zone.js:490)

​`
Any luck with this?
Hey. Got any solution for that ?
For me it ended up being a missing material module, for me it was the MatSelectModule, check that you have the required material modules, i.e. MatInputModule, MatRadioModule, etc..
ng2-select - does not accept ngModel
@sks40gb @rkritika @DanielOrmeno
Add in your app.module.ts these imports.
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import { NativeScriptFormsModule } from "nativescript-angular/forms";
;)
same issue for me
Resolution would be just removed undeclared [(ngModel)] from HTML
or create variable
HI! The component has continued developing in the fork: https://github.com/optimistex/ngx-select-ex
Check the demo: https://optimistex.github.io/ngx-select-ex/
It has a lot of fixed issues. I think the issue solved too.
you might find the solution here.
https://stackoverflow.com/questions/38958347/angular2-rc-5-custom-input-no-value-accessor-for-form-control-with-unspecified
Thank you @krishnpalchouhan
I solve same issue with @krishnpalchouhan 's answer.
I have the same issue and the error was cause by unconsciously setting ngModel in <div>. Check if you set the ngModel on the <input>?
@Nejo12 https://github.com/valor-software/ng2-select/issues/884#issuecomment-370137777
I had the exact same issue. This worked for me. Import the module in your (your module here).module.ts . You have to import npm modules in the module.ts file where the component is using it.
Most helpful comment
For me it ended up being a missing material module, for me it was the MatSelectModule, check that you have the required material modules, i.e. MatInputModule, MatRadioModule, etc..