import { Component , Input , ChangeDetectionStrategy , AfterViewInit , ViewChild , ElementRef } from "@angular/core" ; link link @ Component ( { changeDetection : ChangeDetectionStrategy . OnPush , selector : "sm-menu" , template : `<div class="ui menu {{class}}" #innerElement>
<a href="#/" *ngIf="logo" class="header item">
    <img class="{{logoClass}}" alt="{{title}}" src="{{logo}}">
</a>

<a href="#/" *ngIf="title && !logo" class="header item">
    {{title}}
</a>

<ng-content></ng-content>
</div>
` } ) export class SemanticMenuComponent implements AfterViewInit { @ Input ( ) logo : string ; @ Input ( ) class : string ; @ Input ( ) logoClass : string = "logo" ; @ Input ( ) title : string ; @ ViewChild ( "innerElement" ) innerElement : ElementRef ; ngAfterViewInit ( ) { Array . from ( this . innerElement . nativeElement . childNodes ) . filter ( ( element ) => element . nodeName === "SM-MENU" ) . map ( ( element ) => element . firstElementChild . classList . remove ( "ui" ) ) ; } }