No provider for controlContainer, error on form in angular and ionic

I’ve made this form using angular and Ionic, it gives me an error that i can’t figure out, "No provider for controlContainer", can anyone help me with this? My first tought was that I had forgotten to import the Form and reactive form in my module but that wasnt the case, im lost at what else could be wrong, after googeling for half an hour ive given up on figuring it out therefor im here.


    <ion-col size="1" size-md="3"></ion-col>
    <ion-col size="10" size-md="6">
      <ion-img style="width: 120px; height: 120px; margin-left: calc(50% - 60px)" src="../../../assets/icon/logo.png"></ion-img>
      <ion-card class="margin padding justify-content-center">

        <form [formGroup]="loginForm" (ngSubmit)="addPost(loginForm.value)">
          <ion-label position="floating">UID:</ion-label>
          <ion-input formControlName="uid" inputmode="numeric" clear-input="true" type="text"></ion-input>

          <ion-label position="floating">PIN:</ion-label>
          <ion-input formControlName="pin" inputmode="numeric" clear-input="true" type="password"></ion-input>
        <ion-button color="success" expand="block" type="submit" class="padding" [disabled]="!loginForm.valid">
          <ion-icon slot="start" name="log-in-outline"></ion-icon>

    <ion-col size="1" size-md="3"></ion-col>


import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Component, OnInit } from '@angular/core';

  selector: 'app-login-form',
  templateUrl: './login-form.component.html',
  styleUrls: ['./login-form.component.scss'],
export class LoginFormComponent implements OnInit {

  loginForm: FormGroup;
  post: any;
  uid: string = '';
  pin: string = '';

  constructor(private fb: FormBuilder) {

    this.loginForm ={
      'uid': [null, Validators.compose([Validators.required, Validators.minLength(4), Validators.maxLength(6)])],
      'pin': [null, Validators.compose([Validators.required, Validators.minLength(4), Validators.maxLength(6)])]

     this.uid = post.uid; =;

  ngOnInit() {}


Source: Angular Questions