mirror of
https://github.com/Lissy93/happy-app.git
synced 2021-05-12 19:52:18 +03:00
Submit response needs building next
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { NgModule, ErrorHandler, Injectable, Injector } from "@angular/core";
|
||||
import { HttpModule } from "@angular/http";
|
||||
import { FormsModule } from "@angular/forms";
|
||||
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
||||
import { BrowserModule } from "@angular/platform-browser";
|
||||
import { App } from "./app";
|
||||
|
||||
@@ -51,6 +51,7 @@ export class RollbarErrorHandler implements ErrorHandler {
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
HttpModule,
|
||||
homeRouting,
|
||||
BrowserAnimationsModule,
|
||||
@@ -80,6 +81,7 @@ export class RollbarErrorHandler implements ErrorHandler {
|
||||
TeamService,
|
||||
AllTeamsService,
|
||||
CommonService,
|
||||
SharedModule,
|
||||
{ provide: ErrorHandler, useClass: RollbarErrorHandler },
|
||||
{ provide: Rollbar,
|
||||
useFactory: () => {
|
||||
|
||||
@@ -7,9 +7,23 @@ import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
|
||||
import { MatSelectModule } from "@angular/material/select";
|
||||
import { MatDialogModule } from "@angular/material/dialog";
|
||||
import { MatSnackBarModule } from "@angular/material/snack-bar";
|
||||
import { MatInputModule } from "@angular/material/input";
|
||||
import { MatFormFieldModule } from "@angular/material/form-field";
|
||||
|
||||
// import {
|
||||
// MatButtonModule,
|
||||
// MatCardModule,
|
||||
// MatMenuModule,
|
||||
// MatProgressSpinnerModule,
|
||||
// MatSelectModule,
|
||||
// MatDialogModule,
|
||||
// MatSnackBarModule,
|
||||
// MatInputModule
|
||||
// } from "@angular/material";
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [],
|
||||
exports: [
|
||||
MatButtonModule,
|
||||
MatCardModule,
|
||||
@@ -17,7 +31,9 @@ import { MatSnackBarModule } from "@angular/material/snack-bar";
|
||||
MatProgressSpinnerModule,
|
||||
MatSelectModule,
|
||||
MatDialogModule,
|
||||
MatSnackBarModule
|
||||
MatSnackBarModule,
|
||||
// MatInputModule,
|
||||
MatFormFieldModule
|
||||
]
|
||||
})
|
||||
export class MaterialModule {}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {Component } from "@angular/core";
|
||||
import {FormControl, Validators} from "@angular/forms";
|
||||
|
||||
@Component({
|
||||
selector: "submit-response-page",
|
||||
@@ -13,4 +14,12 @@ export class SubmitResponseComponent {
|
||||
console.log("submit response");
|
||||
}
|
||||
|
||||
email = new FormControl('', [Validators.required, Validators.email]);
|
||||
|
||||
getErrorMessage() {
|
||||
return this.email.hasError('required') ? 'You must enter a value' :
|
||||
this.email.hasError('email') ? 'Not a valid email' :
|
||||
'';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<div class="submit-response-container">
|
||||
|
||||
<p>Hello</p>
|
||||
<!--<mat-form-field>-->
|
||||
<!--<input matInput placeholder="Enter your email" [formControl]="email" required>-->
|
||||
<!--<mat-error *ngIf="email.invalid">{{getErrorMessage()}}</mat-error>-->
|
||||
<!--</mat-form-field>-->
|
||||
|
||||
<p>This feature is still in development- check back soon</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -8,4 +8,8 @@
|
||||
min-width: 12em;
|
||||
margin: 2em 1em;
|
||||
}
|
||||
|
||||
mat-form-field.mat-form-field {
|
||||
font-size: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user