Simple Managment webapp [LLM]
This commit is contained in:
33
webapp/src/app/core/services/notification.service.ts
Normal file
33
webapp/src/app/core/services/notification.service.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { NzMessageService } from 'ng-zorro-antd/message';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class NotificationService {
|
||||
private message = inject(NzMessageService);
|
||||
|
||||
success(content: string): void {
|
||||
this.message.success(content);
|
||||
}
|
||||
|
||||
error(content: string): void {
|
||||
this.message.error(content);
|
||||
}
|
||||
|
||||
warning(content: string): void {
|
||||
this.message.warning(content);
|
||||
}
|
||||
|
||||
info(content: string): void {
|
||||
this.message.info(content);
|
||||
}
|
||||
|
||||
loading(content: string): string {
|
||||
return this.message.loading(content, { nzDuration: 0 }).messageId;
|
||||
}
|
||||
|
||||
remove(id: string): void {
|
||||
this.message.remove(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user