Skip to content

Does not work with reactive forms. Only works with template forms  #22

@GenZodd

Description

@GenZodd

This is a...

  • feature request
  • bug report
  • usage question

What toolchain are you using for transpilation/bundling?

  • @angular/cli
  • Custom @ngTools/webpack
  • Raw ngc
  • SystemJS
  • Rollup
  • webpack

Environment

NodeJS Version: 6
Typescript Version: 2.2
Angular Version: 4
@angular-redux/store version: 6.2.0

Expected Behaviour:

I thought this would work with both reactive and template driven forms. When I set it up via a template driven forms it works. But when I try and add a reactive form to the page I get an error about "no provider for ngForms".

Is this going to/should support reactive forms?

<form [formGroup]="loginForm" connect="loginForm">
            <div class="form-group">
              <label class="center-block">Email</label>
              <input class="form-control" formControlName="email" />
            </div>
            <div class="form-group">
            <label for="password">Password</label>
            <input show-password class="form-control" id="password" type="password" formControlName="password">
          </div>
          </form>

private createForm() {
        this.loginForm = this.fb.group({ 
            email: ['', Validators.required],
            password: ['', Validators.required]
        });

Instead of the template approach found in the sample app (feedback form).

Actual Behaviour:

Returns ERROR Error: Uncaught (in promise): Error: No provider for NgForm!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions