import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'onguard-sidebar-dropdown-item', templateUrl: './sidebar-dropdown-item.component.html', styleUrls: ['./sidebar-dropdown-item.component.scss'], }) export class SidebarDropdownItemComponent implements OnInit { @Input() label: string; @Input() action: () => void; @Input() icon: string; isFontIcon: boolean = true; constructor() {} ngOnInit(): void { // Should a font icon be used or an img tag if (this.icon?.indexOf('.') >= 0) { this.isFontIcon = false; } } }