This is a simple alert component, to help show different level of alerts and easy configurations on how you want it to act. Also, supports confirmation alert. Oh yea! easy to style to follow your own feel.
npm i root-helpers-alerts
Update your app.module.ts
imports array
import { RootHelpersAlertsComponent } from './root-helpers-alerts/root-helpers-alerts.component';
...
imports: [
AppComponent,
RootHelpersAlertsComponent,
....
]
<app-root-helpers-alerts [(message)]="message" [dismissable]="true"></app-root-helpers-alerts>
- message: is a two bounded attribute which takes in
IMessage
export interface IMessage { type: MessageType, message: string, title?: string }
type
can beMessageType.info
,MessageType.success
,MessageType.error
orMessageType.warning