init
This commit is contained in:
		@@ -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)],
 | 
			
		||||
 
 | 
			
		||||
@@ -4,3 +4,7 @@
 | 
			
		||||
  </nav>
 | 
			
		||||
  <div *rbSubBrandHeader>Digital Fingerprint of Plastics</div>
 | 
			
		||||
</rb-full-header>
 | 
			
		||||
 | 
			
		||||
<div class="container">
 | 
			
		||||
  <router-outlet></router-outlet>
 | 
			
		||||
</div>
 | 
			
		||||
 
 | 
			
		||||
@@ -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]
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								src/app/home/home.component.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/app/home/home.component.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<app-login></app-login>
 | 
			
		||||
							
								
								
									
										0
									
								
								src/app/home/home.component.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								src/app/home/home.component.scss
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										25
									
								
								src/app/home/home.component.spec.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/app/home/home.component.spec.ts
									
									
									
									
									
										Normal 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();
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										15
									
								
								src/app/home/home.component.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								src/app/home/home.component.ts
									
									
									
									
									
										Normal 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() {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								src/app/login/login.component.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								src/app/login/login.component.html
									
									
									
									
									
										Normal 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>
 | 
			
		||||
							
								
								
									
										3
									
								
								src/app/login/login.component.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/app/login/login.component.scss
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
.login-wrapper {
 | 
			
		||||
  max-width: 220px;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								src/app/login/login.component.spec.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								src/app/login/login.component.spec.ts
									
									
									
									
									
										Normal 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();
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										19
									
								
								src/app/login/login.component.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/app/login/login.component.ts
									
									
									
									
									
										Normal 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() {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								src/app/validation.service.spec.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/app/validation.service.spec.ts
									
									
									
									
									
										Normal 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();
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
							
								
								
									
										9
									
								
								src/app/validation.service.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/app/validation.service.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
import { Injectable } from '@angular/core';
 | 
			
		||||
 | 
			
		||||
@Injectable({
 | 
			
		||||
  providedIn: 'root'
 | 
			
		||||
})
 | 
			
		||||
export class ValidationService {
 | 
			
		||||
 | 
			
		||||
  constructor() { }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,3 +1,17 @@
 | 
			
		||||
$font-path: "../node_modules/@inst-iot/bosch-angular-ui-components/assets/";
 | 
			
		||||
$rb-extended-breakpoints: false;  // whether to use extended breakpoints xxl and xxxl
 | 
			
		||||
@import "~@inst-iot/bosch-angular-ui-components/styles/global.scss";
 | 
			
		||||
 | 
			
		||||
* {
 | 
			
		||||
  margin: 0;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  box-sizing: border-box;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a, a:active, a:focus {
 | 
			
		||||
  outline: 0 !important;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button::-moz-focus-inner {
 | 
			
		||||
  border: 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user