I'm creating a custom element in Angular 2.0 (<my-select>
), and when I include the ngModel attribute on the component, I'm immediately hit with the following error:
EXCEPTION: No value accessor for '' in [myModel in App@0:195]
Here's a plunker: http://plnkr.co/edit/wlkPWcB92YZASCwCnmcw?p=preview
(Open console to view error)
If you simply comment out the following line from src/app.ts
, the component will render appropriately:
'[ngModel]="myModel"'
I've done the following:
- Imported
{FORM_DIRECTIVES}
from'angular2/common'
- Included
FORM_DIRECTIVES
in thedirectives
portion of the@Component
- Initialized
myModel
What am I missing here?