Skip to content

Commit febc2d6

Browse files
authored
Merge pull request #1 from AITestingOrg/CreateLoginScreen
added and incorporated basic presentation components
2 parents 6361379 + 090d7df commit febc2d6

30 files changed

+300
-144
lines changed

src/app/app.component.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
<!--The whole content below can be removed with the new code.-->
2-
<div style="text-align:center">
3-
<h1>
4-
{{title}}!!
5-
</h1>
6-
<app-login></app-login>
7-
</div>
8-
1+
<div class="page">
2+
<app-toolbar title="UltiCar"></app-toolbar>
3+
<div class="main">
4+
<div class="navLinks">
5+
<a [routerLink]="['']">Register</a>
6+
<a [routerLink]="['/login']">Sign In</a>
7+
</div>
8+
<div id="routing">
9+
<div class="container">
10+
<router-outlet></router-outlet>
11+
</div>
12+
</div>
13+
</div>
14+

src/app/app.component.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.page {
2+
background-color: rgb(31, 95, 121);
3+
}
4+
.main {
5+
text-align: center;
6+
}

src/app/app.component.spec.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import { Component } from '@angular/core';
66
styleUrls: ['./app.component.scss']
77
})
88
export class AppComponent {
9-
title = 'Lit';
9+
title = 'UltiCar';
1010
}

src/app/app.module.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4-
4+
import { Routes, RouterModule } from '@angular/router';
55
import { FeCommonModule } from './common/common.module';
66
import { AppComponent } from './app.component';
7+
import { LoginComponent } from 'app/common/components/smart/login/login.component';
78

8-
import { MatButtonModule, MatCheckboxModule} from '@angular/material';
9+
const routes:Routes = [
10+
{path: '', redirectTo: 'login', pathMatch: 'full'},
11+
{path: 'login', component: LoginComponent},
12+
{path: 'dashboard', component: LoginComponent}
13+
]
914

1015
@NgModule({
1116
declarations: [
@@ -14,9 +19,9 @@ import { MatButtonModule, MatCheckboxModule} from '@angular/material';
1419
imports: [
1520
BrowserModule,
1621
BrowserAnimationsModule,
17-
FeCommonModule
22+
FeCommonModule,
23+
RouterModule.forRoot(routes)
1824
],
19-
providers: [],
2025
bootstrap: [AppComponent]
2126
})
2227
export class AppModule { }

src/app/common/common.module.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3+
import { FormsModule } from '@angular/forms';
34
import { TextBoxComponent } from './components/presentation/text-box/text-box.component';
45
import { LoginComponent } from './components/smart/login/login.component';
56
import { CheckBoxComponent } from './components/presentation/check-box/check-box.component';
7+
import { ToolbarComponent } from './components/presentation/toolbar/toolbar.component';
8+
import { RaisedButtonComponent } from './components/presentation/raised-button/raised-button.component';
9+
import { BasicButtonComponent } from './components/presentation/basic-button/basic-button.component';
10+
import { IconButtonComponent } from './components/presentation/icon-button/icon-button.component';
11+
import { MatToolbarModule, MatCheckboxModule, MatButtonModule, MatFormFieldModule, MatFormFieldControl, MatInputModule, MatIconModule, MatCardModule } from '@angular/material';
612

713
@NgModule({
814
imports: [
9-
CommonModule
15+
CommonModule, MatToolbarModule, MatCheckboxModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatIconModule, MatCardModule, FormsModule
1016
],
11-
declarations: [TextBoxComponent, LoginComponent, CheckBoxComponent],
12-
exports: [
13-
LoginComponent, TextBoxComponent, CheckBoxComponent]
17+
declarations: [TextBoxComponent, LoginComponent, CheckBoxComponent, ToolbarComponent, RaisedButtonComponent, BasicButtonComponent, IconButtonComponent],
18+
exports: [ToolbarComponent],
1419
})
20+
1521
export class FeCommonModule { }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<button mat-button [color]="color" (click)="click($event)">{{label}}</button>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.mat-button {
2+
min-width: 200px;
3+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-basic-button',
5+
templateUrl: './basic-button.component.html',
6+
styleUrls: ['./basic-button.component.scss']
7+
})
8+
export class BasicButtonComponent implements OnInit {
9+
10+
@Input() private label:string
11+
@Input() private color:string
12+
13+
@Output() public clickEvent:EventEmitter<any> = new EventEmitter();
14+
15+
constructor() { }
16+
17+
ngOnInit() {
18+
}
19+
20+
click(event) {
21+
this.clickEvent.emit(event);
22+
}
23+
24+
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<p>
2-
DRIVER-CHECKBOX
3-
</p>
1+
<mat-checkbox [color]="color" [(ngModel)]="checkboxValue" (ngModelChange)="onChange($event)">{{label}}</mat-checkbox>

0 commit comments

Comments
 (0)