Broker System for Supercredit
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

30 lines
685B

  1. import { Component } from '@angular/core';
  2. import { mainMenuItems } from './main-menu-items';
  3. import { MenuService } from './service/menu.service';
  4. @Component({
  5. selector: 'app-root',
  6. templateUrl: './app.component.html',
  7. styleUrls: ['./app.component.scss']
  8. })
  9. export class AppComponent {
  10. title = 'broker';
  11. public items: any[] = mainMenuItems;
  12. constructor(private menuService: MenuService){
  13. }
  14. public menuItemHasFontawesome (item: any) : boolean {
  15. return item.hasOwnProperty('fa');
  16. }
  17. public onSelect({ item }): void {
  18. if (!item.items) {
  19. this.menuService.itemClicked.emit(item);
  20. //console.log("emit on select : " + item.text);
  21. }
  22. }
  23. }