UNPKG

ng-semantic

Version:

Angular2 building blocks based on Semantic UI

28 lines (23 loc) 600 B
import { Component, ChangeDetectionStrategy, ViewChild, ElementRef } from "@angular/core"; declare var jQuery: any; @Component({ changeDetection: ChangeDetectionStrategy.OnPush, selector: "sm-transition", template: ` <div #transition> <ng-content></ng-content> </div> ` }) export class SemanticTransitionComponent { @ViewChild("transition") transition: ElementRef; /** * Show transition element * * @param options */ show(options?: {}) { jQuery(this.transition.nativeElement) .transition(options || {}); } }