FormControl
This commit is contained in:
parent
d58070c5ba
commit
f8b7acd5c6
@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { RegisterComponent } from './register/register.component';
|
||||
import { AccountRoutingModule } from './account-routing.module';
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
|
||||
|
||||
|
||||
@ -13,7 +14,8 @@ import { AccountRoutingModule } from './account-routing.module';
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
AccountRoutingModule
|
||||
AccountRoutingModule,
|
||||
SharedModule
|
||||
]
|
||||
})
|
||||
export class AccountModule { }
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
@ -6,10 +7,19 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./login.component.scss']
|
||||
})
|
||||
export class LoginComponent implements OnInit {
|
||||
loginForm: FormGroup;
|
||||
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
createLoginForm(){
|
||||
this.loginForm = new FormGroup({
|
||||
email: new FormControl('', Validators.required),
|
||||
password: new FormControl('', Validators.required)
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { PaginationModule } from 'ngx-bootstrap/pagination';
|
||||
import { CarouselModule } from 'ngx-bootstrap/carousel';
|
||||
import { PagingHeaderComponent } from './components/paging-header/paging-header.component';
|
||||
@ -17,14 +18,16 @@ import { OrderTotalsComponent } from './components/order-totals/order-totals.com
|
||||
imports: [
|
||||
CommonModule,
|
||||
PaginationModule.forRoot(),
|
||||
CarouselModule.forRoot()
|
||||
CarouselModule.forRoot(),
|
||||
ReactiveFormsModule
|
||||
],
|
||||
exports: [
|
||||
PaginationModule,
|
||||
PagingHeaderComponent,
|
||||
PagerComponent,
|
||||
CarouselModule,
|
||||
OrderTotalsComponent
|
||||
OrderTotalsComponent,
|
||||
ReactiveFormsModule
|
||||
]
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
Loading…
Reference in New Issue
Block a user