Topic: Can't bind to 'formControl' since it isn't a known property of 'input'

vazom pro asked 6 years ago


Hi there, When i try to use the modal forms i get the following even though i have registered the FormsModule in my AppModule:
compiler.js:1021 Uncaught Error: Template parse errors:
Can't bind to 'formControl' since it isn't a known property of 'input'. ("text"></i>
          <input type="text" id="form34" class="form-control validate" mdbInputDirective [ERROR ->][formControl]="contactFormModalName">
          <label data-error="wrong" data-success="right" for="f"): ng:///AppModule/HomeComponent.html@111:89
Can't bind to 'formControl' since it isn't a known property of 'input'. ("ext"></i>
          <input type="email" id="form29" class="form-control validate" mdbInputDirective [ERROR ->][formControl]="contactFormModalEmail">
          <label data-error="wrong" data-success="right" for=""): ng:///AppModule/HomeComponent.html@117:90
Can't bind to 'formControl' since it isn't a known property of 'input'. ("text"></i>
          <input type="text" id="form32" class="form-control validate" mdbInputDirective [ERROR ->][formControl]="contactFormModalSubject">
          <label data-error="wrong" data-success="right" for"): ng:///AppModule/HomeComponent.html@123:89
Can't bind to 'formControl' since it isn't a known property of 'textarea'. ("       <textarea type="text" id="form8" class="md-textarea form-control" rows="1" mdbInputDirective [ERROR ->][formControl]="contactFormModalMessage"></textarea>
          <label data-error="wrong" data-success="): ng:///AppModule/HomeComponent.html@129:103
No provider for NgControl ("
        <div class="md-form mb-5">
          <i class="fa fa-user prefix grey-text"></i>
          [ERROR ->]<input type="text" id="form34" class="form-control validate" mdbInputDirective [formControl]="contact"): ng:///AppModule/HomeComponent.html@111:10
No provider for NgControl ("     <div class="md-form mb-5">
          <i class="fa fa-envelope prefix grey-text"></i>
          [ERROR ->]<input type="email" id="form29" class="form-control validate" mdbInputDirective [formControl]="contac"): ng:///AppModule/HomeComponent.html@117:10
No provider for NgControl ("
        <div class="md-form mb-5">
          <i class="fa fa-tag prefix grey-text"></i>
          [ERROR ->]<input type="text" id="form32" class="form-control validate" mdbInputDirective [formControl]="contact"): ng:///AppModule/HomeComponent.html@123:10
No provider for NgControl ("
        <div class="md-form">
          <i class="fa fa-pencil prefix grey-text"></i>
          [ERROR ->]<textarea type="text" id="form8" class="md-textarea form-control" rows="1" mdbInputDirective [formCon"): ng:///AppModule/HomeComponent.html@129:10

Arkadiusz Idzikowski staff answered 6 years ago


Dear vazom, Form control is part of Angular reactive forms. Please add ReactiveFormsModule instead. Regards, Arek

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags