Redirect to formula manager if in electron app

This commit is contained in:
Zakary Timson 2018-07-11 21:08:53 -04:00
parent 7ea22720fe
commit e3ebe48f68

View File

@ -1,7 +1,17 @@
import {Component} from '@angular/core'; import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {ElectronService} from 'ngx-electron';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
templateUrl: 'app.component.html' templateUrl: 'app.component.html'
}) })
export class AppComponent {} export class AppComponent implements OnInit {
constructor(private router: Router, public electron: ElectronService) {}
ngOnInit() {
if(this.electron.isElectronApp) {
this.router.navigate(['/formulaManager']);
}
}
}