import { Component, OnInit, Input } from '@angular/core'; import { IconModel } from '../../../models/icon/icon.model'; import { NotificationModel } from '../../../models/notification'; import { ButtonModel } from '../../../models/button/button.model'; import { InputModel } from '../../../models/input/input.model'; import { I18NService } from '../../../services/i18n-service/i18n.service'; @Component({ selector: 'cf-demo-core-1', template: "
{{it | json}}
", styles: [""] }) export class CfDemoCore1 implements OnInit { title = "DemoCore"; myTooltip = { message: "My Test Tooltip", position: "above" }; button1= new ButtonModel ({ label: "Button without tooltip" }); button2 = new ButtonModel ({ label: "Button with tooltip" }); notificationIcon = new IconModel({ name: "email", type: "mi", size: "50px", color: { foreground: "lightseagreen", background: "transparent" } }); notificationIcon2 = new IconModel({ name: "person", type: "mi", size: "50px", color: { foreground: "lightseagreen", background: "transparent" } }); letters: number = 0; myNotifications: NotificationModel = { value: this.letters, type: 'text' }; notiIcon: IconModel; myNotifications2: NotificationModel = { classes: 'mat-warn', type: 'icon', icon: this.notiIcon }; button5 = new ButtonModel({ label: "Send mail", color: { foreground: "", background: "primary" }, icon: null, icon_position:"right" }); sendMessage() { ++this.myNotifications.value; if(this.myNotifications.value) { this.myNotifications2.icon = { name: 'email', type: 'mi' } } } notifications = []; log(e){ this.notifications.push(e); } constructor(private i18nService: I18NService) {} ngOnInit() { } }