definma-ui/src/app/app.component.ts

34 lines
808 B
TypeScript
Raw Normal View History

2020-07-13 10:52:10 +02:00
import { Component, isDevMode} from '@angular/core';
import {LoginService} from './services/login.service';
import {Router} from '@angular/router';
// TODO: add multiple samples at once
// TODO: guess properties from material name
// TODO: validation: VZ, Humidity: min/max value, DPT: filename
// TODO: filter by not completely filled/no measurements
// TODO: account
2020-07-13 10:52:10 +02:00
// TODO: admin user handling, template pages, validation of samples
2020-01-14 13:41:28 +01:00
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
2020-05-22 12:52:17 +02:00
constructor(
public loginService: LoginService,
private router: Router
2020-05-22 12:52:17 +02:00
) {
}
2020-07-13 10:52:10 +02:00
get devMode() {
return isDevMode();
}
logout() {
this.loginService.logout();
this.router.navigate(['/']);
}
2020-01-14 13:41:28 +01:00
}