ng-semantic
Version:
Angular2 building blocks based on Semantic UI
44 lines (39 loc) • 1.15 kB
text/typescript
import { Component, Input, ChangeDetectionStrategy, ViewChild, ElementRef } from "@angular/core";
declare var jQuery: any;
/**
* Component, implementation of Semantic UI modal components.
*
* This component is triggered by SMModalDirective.
*/
export class SemanticModalComponent {
class: string;
title: string;
icon: string;
modal: ElementRef;
show(data?: {}) {
jQuery(this.modal.nativeElement)
.modal(data || {})
.modal("toggle");
}
hide() {
jQuery(this.modal.nativeElement)
.modal("hide");
}
}