ng-semantic
Version:
Angular2 building blocks based on Semantic UI
33 lines (29 loc) • 1.02 kB
text/typescript
import { Component, Input, ChangeDetectionStrategy, AfterViewInit, ViewChild, ElementRef } from "@angular/core";
/**
* Implementation of Menu component
*
* @link http://semantic-ui.com/collections/menu.html
* @link http://semantic-ui.com/elements/icon.html
*/
export class SemanticMenuComponent implements AfterViewInit {
logo: string;
class: string;
title: string;
innerElement: ElementRef;
ngAfterViewInit() {
Array.from(this.innerElement.nativeElement.childNodes)
.filter((element: Element) => element.nodeName === "SM-MENU")
.map((element: Element) => element.firstElementChild.classList.remove("ui"));
}
}