Projekt

Obecné

Profil

Stáhnout (619 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
import { Component, OnInit } from '@angular/core';
2
import { MenuItem } from './menu-item';
3

    
4
const MENU_ITEMS: MenuItem[] = [
5
  {name: 'Dashboard', routePath: 'dashboard'},
6
  {name: 'Zaměstnanci', routePath: 'employees'},
7
];
8

    
9
@Component({
10
  selector: 'app-menu',
11
  templateUrl: './menu.component.html',
12
  styleUrls: ['./menu.component.sass']
13
})
14
export class MenuComponent implements OnInit {
15
  _menuItems: MenuItem[];
16
  private _selectedMenuItem: MenuItem;
17

    
18
  constructor() {
19
    this._menuItems = MENU_ITEMS;
20
  }
21

    
22
  ngOnInit() {
23
  }
24

    
25
  onSelect(menuItem: MenuItem): void {
26
    this._selectedMenuItem = menuItem;
27
  }
28
}
(4-4/4)