Radek Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 1 | import { Component } from '@angular/core'; |
Radek Krejci | 2b51068 | 2018-04-27 14:31:39 +0200 | [diff] [blame] | 2 | import {Router} from '@angular/router'; |
| 3 | |
| 4 | import {SessionsService} from './config/sessions.service'; |
Radek Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 5 | |
| 6 | @Component({ |
| 7 | selector : 'netopeer-dashboard', |
| 8 | templateUrl : './dashboard.component.html', |
Radek Krejci | 2b51068 | 2018-04-27 14:31:39 +0200 | [diff] [blame] | 9 | styleUrls : ['./netopeer.scss', 'inventory/inventory.component.scss'] |
Radek Krejci | d23f0df | 2017-08-31 16:34:49 +0200 | [diff] [blame] | 10 | }) |
| 11 | |
Radek Krejci | 2b51068 | 2018-04-27 14:31:39 +0200 | [diff] [blame] | 12 | export class DashboardComponent { |
| 13 | |
| 14 | constructor(public sessionsService: SessionsService, |
| 15 | private router: Router) {} |
| 16 | |
| 17 | gotoConfig(session) { |
| 18 | this.sessionsService.changeActiveSession(session.key); |
| 19 | this.router.navigateByUrl('/netopeer/config'); |
| 20 | } |
| 21 | } |