added help component, improved prediction with model templates
This commit is contained in:
14
src/app/help/help.component.html
Normal file
14
src/app/help/help.component.html
Normal file
@ -0,0 +1,14 @@
|
||||
<h3>Help</h3>
|
||||
|
||||
<ng-container [ngSwitch]="route">
|
||||
<p *ngSwitchCase="'/'">Please log in for further access. If you do not have an account yet, please contact
|
||||
<a [href]="'mailto:' + d.contact">{{d.contact}}</a>.
|
||||
</p>
|
||||
<p *ngSwitchCase="'/home'">Please log in for further access. If you do not have an account yet, please contact
|
||||
<a [href]="'mailto:' + d.contact">{{d.contact}}</a>.
|
||||
</p>
|
||||
<p *ngSwitchDefault>
|
||||
Sadly, currently there is no help available for this page. Please contact
|
||||
<a [href]="'mailto:' + d.contact">{{d.contact}}</a> for further questions.
|
||||
</p>
|
||||
</ng-container>
|
0
src/app/help/help.component.scss
Normal file
0
src/app/help/help.component.scss
Normal file
25
src/app/help/help.component.spec.ts
Normal file
25
src/app/help/help.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HelpComponent } from './help.component';
|
||||
|
||||
describe('HelpComponent', () => {
|
||||
let component: HelpComponent;
|
||||
let fixture: ComponentFixture<HelpComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ HelpComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(HelpComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
24
src/app/help/help.component.ts
Normal file
24
src/app/help/help.component.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {DataService} from '../services/data.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-help',
|
||||
templateUrl: './help.component.html',
|
||||
styleUrls: ['./help.component.scss']
|
||||
})
|
||||
export class HelpComponent implements OnInit {
|
||||
|
||||
route = '';
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
public d: DataService
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route = this.router.url.replace(/\/[0-9a-f]{24}/, ''); // remove ids
|
||||
console.log(this.route);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user