Topic: Error Form Login MDB Angular

allancmello pro asked 3 years ago

This error is showing:

compiler.js:2426 Uncaught Error: Template parse errors: No provider for ControlContainer ("

        [ERROR ->]<form [formGroup]="darkForm">
          <div class="md-form">
            <input type="text" "): ng:///AppModule/LoginComponent.html@27:12

No provider for NgControl (" [ERROR ->]

<div class="container">

<div class="col-md-6 mx-auto">
  <!--h4 class="text-center">Dark form</h4-->
  <!--Section: Live preview-->
  <section class="form-dark">

    <!--Form without header-->
    <div class="card card-image" style="background-image: url('');">
      <div class="text-white rgba-stylish-strong py-5 px-5 z-depth-4">

        <div class="text-center">
          <h3 class="white-text mb-5 mt-4 font-weight-bold">
            <strong>SEJA BEM</strong>
            <a class="green-text font-weight-bold">
              <strong> VINDO!</strong>

        <form [formGroup]="darkForm">
          <div class="md-form">
            <input type="text" id="darkFormEmailEx" class="form-control white-text" formControlName="darkFormEmailEx" mdbInputDirective>
            <label for="darkFormEmailEx">Seu Email</label>

          <div class="md-form pb-3">
            <input type="password" id="darkFormPasswordEx" class="form-control white-text" formControlName="darkFormPasswordEx" mdbInputDirective>
            <label for="darkFormPasswordEx">Sua Senha</label>

        <!--Grid row-->
        <div class="row d-flex align-items-center mb-4">

          <!--Grid column-->
          <div class="text-center mb-3 col-md-12">
            <button type="submit" mdbBtn color="success" block="true" rounded="true" class="z-depth-1 waves-light"
          <!--Grid column-->
        <!--Grid row-->

        <!--Grid column-->
        <div class="col-md-12">
          <p class="font-small white-text d-flex justify-content-end">Perdeu sua senha?
            <a class="green-text ml-1 font-weight-bold" routerLink="/"> Recuperar</a>
        <!--Grid column-->

    <!--/Form without header-->

  <!--Section: Live preview-->

Arkadiusz Idzikowski staff answered 3 years ago


You need to import ReactiveFormsModule in your module file.

allancmello pro commented 3 years ago

Yes Arkadiusz. It´s works for me. Thanks

Please insert min. 20 characters.


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



Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.4.3
  • Device: browser
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No