This commit is contained in:
VLE2FE
2020-05-19 12:49:06 +02:00
parent bd656352f7
commit 7f47af425d
17 changed files with 197 additions and 5 deletions

View File

@ -1,8 +1,11 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {HomeComponent} from './home/home.component';
const routes: Routes = [];
const routes: Routes = [
{path: '', component: HomeComponent}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],

View File

@ -4,3 +4,7 @@
</nav>
<div *rbSubBrandHeader>Digital Fingerprint of Plastics</div>
</rb-full-header>
<div class="container">
<router-outlet></router-outlet>
</div>

View File

@ -4,15 +4,21 @@ import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {RbUiComponentsModule} from '@inst-iot/bosch-angular-ui-components';
import { LoginComponent } from './login/login.component';
import { HomeComponent } from './home/home.component';
import {FormsModule} from '@angular/forms';
@NgModule({
declarations: [
AppComponent
AppComponent,
LoginComponent,
HomeComponent
],
imports: [
BrowserModule,
AppRoutingModule,
RbUiComponentsModule
RbUiComponentsModule,
FormsModule
],
providers: [],
bootstrap: [AppComponent]

View File

@ -0,0 +1 @@
<app-login></app-login>

View File

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@ -0,0 +1,10 @@
<div class="login-wrapper">
<h2>Please log in</h2>
<rb-form-input name="username" label="username">
</rb-form-input>
<rb-form-input type="password" name="password" label="password">
</rb-form-input>
<button class="rb-btn rb-primary">Login</button>
<span>{{message}}</span>
</div>

View File

@ -0,0 +1,3 @@
.login-wrapper {
max-width: 220px;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoginComponent } from './login.component';
describe('LoginComponent', () => {
let component: LoginComponent;
let fixture: ComponentFixture<LoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,19 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {
message = '';
constructor() { }
ngOnInit() {
}
}

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { ValidationService } from './validation.service';
describe('ValidationService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: ValidationService = TestBed.get(ValidationService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class ValidationService {
constructor() { }
}