ng2-encrm-components
Version:
43 lines (36 loc) • 1.03 kB
text/typescript
import { Component, OnInit } from '@angular/core';
({
selector: 'alerts-preview',
template: require('./alerts-preview.component.html')
})
export class AlertsPreviewComponent implements OnInit {
constructor() { }
ngOnInit() { }
/*----------------------------------------------------------
* ALERTS
*---------------------------------------------------------*/
public alerts: any[] = [
{
type: 'danger',
msg: 'Oh snap! Change a few things up and try submitting again.'
},
{
type: 'success',
msg: 'Well done! You successfully read this important alert message.',
closable: true
},
{
type: 'info',
msg: 'Well done! You successfully read this important alert message.',
closable: true
},
{
type: 'warning',
msg: 'Well done! You successfully read this important alert message.',
closable: true
}
];
public closeAlert(i: number): void {
this.alerts.splice(i, 1);
}
}