Severities in Angular Message

26 Sep 20261 minute to read

The severity denotes the importance and context of the Angular Message to the user. The Angular Message contains different severity types. Use the severity property to display the Angular Messages with different severity levels.

The available severity types are Normal, Success, Info, Warning and Error. The default severity type for Angular Messages is Normal.

The following example demonstrates the severity of the Angular Messages.

import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { MessageModule } from '@syncfusion/ej2-angular-notifications'




import { Component } from '@angular/core';

@Component({
imports: [
         MessageModule
    ],


standalone: true,
    selector: 'app-root',
    template: `<div class="msg-default-section">
        <div class="content-section">
            <ejs-message id="msg_default" content="Editing is restricted"></ejs-message>
            <ejs-message id="msg_info" content="Please read the comments carefully" severity="Info"></ejs-message>
            <ejs-message id="msg_success" content="Your message has been sent successfully" severity="Success"></ejs-message>
            <ejs-message id="msg_warning" content="There was a problem with your network connection" severity="Warning"></ejs-message>
            <ejs-message id="msg_error" content="A problem occurred while submitting your data" severity="Error"></ejs-message>
        </div>
    </div>`
})
export class AppComponent{
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
bootstrapApplication(AppComponent).catch((err) => console.error(err));