No provider for ControlContainer Error in Angular




Asked on August 31, 2018
I am creating Angular material application form with validation and getting error.

Error: Template parse errors:
No provider for ControlContainer ("[ERROR ->]<form class="my-form">

  <mat-form-field class="my-form-field">

    <input matInput place"): ng:///AppModule/ArticleComponent.html@0:0

How to fix it?



Replied on August 31, 2018
Provider for ControlContainer is FormsModule from @angular/forms

You need to import 

import { FormsModule } from '@angular/forms';

in application module.




Replied on August 31, 2018
Thanks. Got fixed.

Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us