I got the following error when I tried to bind a String to ngModel:
Error: Template parse errors: line 2, column 21 of ChatFormComponent: ParseErrorLevel.FATAL: Can't bind to 'ngModel' since it isn't a known native property or known directive. Please fix typo or add to directives list. [(ngModel)]="message"
This error is because it is missing formsDirectives in the component: https://webdev.dartlang.org/angular/tutorial/toh-pt1#declare-non-core-directives
It worked after I added it. However, I am tired of adding directives one by one to every components. I have two questions:
Thank you
You need to add providers to each component. There is no way around it.