title: Error: Can't resolve all parameters for FormGroup: (?, ?, ?)
body: <p>I'm Trying to use de FormBuilder on my Ionic 4 App but it Throws me this error</p>
  
  <pre><code>compiler.js:2430 Uncaught Error: Can't resolve all parameters for FormGroup: (?, ?, ?).
  at syntaxError (compiler.js:2430)
  at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getDependenciesMetadata (compiler.js:18983)
  at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getTypeMetadata (compiler.js:18876)
  at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getInjectableTypeMetadata (compiler.js:19098)
  at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getProviderMetadata (compiler.js:19107)
  at compiler.js:19045
  at Array.forEach (&lt;anonymous&gt;)
  at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver._getProvidersMetadata (compiler.js:19005)
  at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (compiler.js:18724)
  at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._loadModules (compiler.js:26025)
  </code></pre>
  
  <p>I've read this question <a href="https://stackoverflow.com/questions/40537628/angular-2-error-cant-resolve-all-parameters-for-formgroup">angular 2 error: Can&#39;t resolve all parameters for FormGroup</a> but import the <code>ReactiveFormsModule</code> into the appmodule.ts dont solved. Look:</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { RouteReuseStrategy } from '@angular/router';
  
  import { IonicModule, IonicRouteStrategy, ModalController } from '@ionic/angular';
  import { SplashScreen } from '@ionic-native/splash-screen/ngx';
  import { StatusBar } from '@ionic-native/status-bar/ngx';
  
  import { AppRoutingModule } from './app-routing.module';
  import { AppComponent } from './app.component';
  
  import { IonicStorageModule } from '@ionic/storage'
  
  import { AutenticacaoService } from './services/autenticacao.service'
  import { GuardaautenticacaoService } from './services/guardaautenticacao.service'
  import { LoadHomeService } from './private/home/load-home.service';
  import { HttpClientModule } from '@angular/common/http';
  
  import { TarefasDetalhePageModule } from './private/sharedmodule/tarefas-detalhe/tarefas-detalhe.module'
  import { TarefadetalheService } from './private/sharedmodule/tarefas-detalhe/tarefadetalhe.service';
  import { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms';
  
  @NgModule({
    declarations: [AppComponent],
    entryComponents: [],
    imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
       IonicStorageModule.forRoot(),HttpClientModule,  TarefasDetalhePageModule   ],
    providers: [
      StatusBar,
      SplashScreen,
      { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
      AutenticacaoService,
      GuardaautenticacaoService,
      LoadHomeService,
      ModalController,
      TarefadetalheService,
      FormBuilder,
      FormGroup,
      ReactiveFormsModule
    ],
    bootstrap: [AppComponent]
  })
  export class AppModule {}
  </code></pre>
  
  <p>That's my class that is trying to create the form:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { NavParams, ModalController } from '@ionic/angular';
  import { TarefadetalheService } from './tarefadetalhe.service';
  import { Tarefa } from '../../models/tarefa.model';
  import { TipoTarefa } from '../../models/tipotarefa.model';
  
  import { FormGroup, FormBuilder, Validators } from '@angular/forms';
  @Component({
    selector: 'app-tarefas-detalhe',
    templateUrl: './tarefas-detalhe.page.html',
    styleUrls: ['./tarefas-detalhe.page.scss'],
  })
  export class TarefasDetalhePage implements OnInit {
   idTarefa = null
   tarefa: Tarefa
   tiposTarefas : TipoTarefa[]
   formulario: FormGroup
    constructor(
      private navParams: NavParams,
      private getTarefaDetalhe: TarefadetalheService,
      private modalController:ModalController,
      public fb: FormBuilder) {   }
  
    ngOnInit() {
      this.getGeral()
      this.getTiposTarefas()
      this.createForm()
    }
  
    getGeral(){
      this.idTarefa = this.navParams.get('id_tarefa');
      this.getTarefaDetalhe.recuperaDetalhes().subscribe((data)=&gt;{ //passar o id da tarefa como parametro no recupera detalhes
      this.tarefa = data
     })
    }
    getTiposTarefas(){
      this.getTarefaDetalhe.recuperaTiposTarefas().subscribe((data)=&gt;{
        this.tiposTarefas = data
      })
    }
  
    createForm(){
      this.formulario = this.fb.group({
        'tipotarefa':['', Validators.compose([Validators.required])]
     });
    }
   closeModal()
   {
     this.modalController.dismiss();
   }
  }
  </code></pre>
  
  <p>and here's my HTML:</p>
  
  <pre><code>&lt;ion-content padding *ngIf="tarefa != null"&gt;
    &lt;form [formGroup]="formulario"&gt;
      &lt;h4&gt;
        &lt;ion-icon name="list-box"&gt;&lt;/ion-icon&gt; Geral
      &lt;/h4&gt;
      &lt;ion-grid&gt;
  
        &lt;ion-row&gt;
          &lt;ion-col size="8"&gt;
            &lt;ion-label position="floating"&gt;Tipo de Tarefa&lt;/ion-label&gt;
            &lt;ion-select formControlName="tipotarefa" [ngModel]="tarefa.tipoTarefa.id" okText="Confirmar" cancelText="Cancelar"&gt;
  
              &lt;ion-select-option *ngFor="let tipo of tiposTarefas" [value]="tipo.id"&gt;{{tipo.descricao}}&lt;/ion-select-option&gt;
            &lt;/ion-select&gt;
          &lt;/ion-col&gt;
        &lt;/ion-row&gt;
      &lt;/ion-grid&gt;
      &lt;h4&gt;
        &lt;ion-icon name="calendar"&gt;&lt;/ion-icon&gt; Horário
      &lt;/h4&gt;
      &lt;ion-item-divider&gt;&lt;/ion-item-divider&gt;
      &lt;ion-grid&gt;
        &lt;ion-row&gt;
          &lt;ion-col size="5"&gt;
            &lt;ion-label position="stacked"&gt;Data&lt;/ion-label&gt;
            &lt;ion-datetime display-format="DD-MM-YYYY" max="2050-10-31" picker-format="DD-MM-YYYY" [ngModel]="tarefa.data_tarefa"&gt;&lt;/ion-datetime&gt;
          &lt;/ion-col&gt;
          &lt;ion-col size="3"&gt;
            &lt;ion-label position="stacked"&gt;Inicio&lt;/ion-label&gt;
            &lt;ion-datetime display-format="HH:mm" picker-format="HH:mm" [ngModel]="tarefa.inicio"&gt;&lt;/ion-datetime&gt;
          &lt;/ion-col&gt;
          &lt;ion-col size="3"&gt;
            &lt;ion-label position="stacked"&gt;Fim&lt;/ion-label&gt;
            &lt;ion-datetime display-format="HH:mm" picker-format="HH:mm" [ngModel]="tarefa.fim"&gt;&lt;/ion-datetime&gt;
          &lt;/ion-col&gt;
        &lt;/ion-row&gt;
      &lt;/ion-grid&gt;
      &lt;h4&gt;
        &lt;ion-icon name="person"&gt;&lt;/ion-icon&gt; Cliente
      &lt;/h4&gt;
      &lt;ion-item-divider&gt;&lt;/ion-item-divider&gt;
      &lt;ion-grid&gt;
  
        &lt;ion-row&gt;
  
        &lt;/ion-row&gt;
      &lt;/ion-grid&gt;
    &lt;/form&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>Here's my github repo if you want:
  <a href="https://github.com/tiagosilveiraa/PManager" rel="nofollow noreferrer">https://github.com/tiagosilveiraa/PManager</a></p>