Hello,

I'm not sure why but my app keeps crashing if I import ReactiveFormsModule 
into app.module.

Any ideas as to why its not loading correctly?

app.module.ts

> import { NgModule }      from '@angular/core';
> import { BrowserModule } from '@angular/platform-browser';
> import { FormsModule } from '@angular/forms';
> import { *ReactiveFormsModule* } from '@angular/forms';
> import { AppComponent }   from './app.component';
> import { UserLoginComponent } from './user-login.component';
> @NgModule({
>   imports:      [ BrowserModule, *ReactiveFormsModule*],
>   declarations: [ AppComponent , UserLoginComponent],  
>   
>   bootstrap:    [ AppComponent ]
> })
> export class AppModule { }
>
>
App.component.ts
import { Component } from '@angular/core';


@Component({
  selector: 'my-app',
  template: `<h1>User Login</h1>
              <user-LoginForm></user-LoginForm>`   
})


export class AppComponent { }

user-login.component.ts
 import { Component } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';


@Component({
  selector: 'user-LoginForm',
  templateUrl: 'app/views/login-form.component.html' 
})


export class UserLoginComponent { 
registerForm: any;


}

Error message

zone.js:484 Unhandled Promise rejection: Template parse errors:
No provider for ControlContainer ("[ERROR ->]<form  >
    <div class="container1">
        <h2>login: </h2>
"): UserLoginComponent@0:0 ; Zone: <root> ; Task: Promise.then ; Value: 
Error: Template parse errors:(…) Error: Template parse errors:
No provider for ControlContainer ("[ERROR ->]<form  >
    <div class="container1">
        <h2>login: </h2>
"): UserLoginComponent@0:0
    at TemplateParser.parse (http:
//localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:8525:21)
    at RuntimeCompiler._compileTemplate (http:
//localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16879:53)
    at eval (http:
//localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16802:85)
    at Set.forEach (native)
    at compile (http:
//localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16802:49)
    at ZoneDelegate.invoke (http:
//localhost:3000/node_modules/zone.js/dist/zone.js:332:29)
    at Zone.run (http:
//localhost:3000/node_modules/zone.js/dist/zone.js:225:44)
    at http://localhost:3000/node_modules/zone.js/dist/zone.js:591:58
    at ZoneDelegate.invokeTask (http:
//localhost:3000/node_modules/zone.js/dist/zone.js:365:38)
    at Zone.runTask (http:
//localhost:3000/node_modules/zone.js/dist/zone.js:265:48)

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to