@@ -25,30 +25,50 @@ export class NzNotificationService extends NzMNService {
2525 super ( nzSingletonService , overlay , injector ) ;
2626 }
2727
28- success ( title : string , content : string , options ?: NzNotificationDataOptions ) : NzNotificationRef {
29- return this . createInstance ( { type : 'success' , title, content } , options ) ;
28+ success (
29+ title : string | TemplateRef < void > ,
30+ content : string | TemplateRef < void > ,
31+ options ?: NzNotificationDataOptions
32+ ) : NzNotificationRef {
33+ return this . create ( 'success' , title , content , options ) ;
3034 }
3135
32- error ( title : string , content : string , options ?: NzNotificationDataOptions ) : NzNotificationRef {
33- return this . createInstance ( { type : 'error' , title, content } , options ) ;
36+ error (
37+ title : string | TemplateRef < void > ,
38+ content : string | TemplateRef < void > ,
39+ options ?: NzNotificationDataOptions
40+ ) : NzNotificationRef {
41+ return this . create ( 'error' , title , content , options ) ;
3442 }
3543
36- info ( title : string , content : string , options ?: NzNotificationDataOptions ) : NzNotificationRef {
37- return this . createInstance ( { type : 'info' , title, content } , options ) ;
44+ info (
45+ title : string | TemplateRef < void > ,
46+ content : string | TemplateRef < void > ,
47+ options ?: NzNotificationDataOptions
48+ ) : NzNotificationRef {
49+ return this . create ( 'info' , title , content , options ) ;
3850 }
3951
40- warning ( title : string , content : string , options ?: NzNotificationDataOptions ) : NzNotificationRef {
41- return this . createInstance ( { type : 'warning' , title, content } , options ) ;
52+ warning (
53+ title : string | TemplateRef < void > ,
54+ content : string | TemplateRef < void > ,
55+ options ?: NzNotificationDataOptions
56+ ) : NzNotificationRef {
57+ return this . create ( 'warning' , title , content , options ) ;
4258 }
4359
44- blank ( title : string , content : string , options ?: NzNotificationDataOptions ) : NzNotificationRef {
45- return this . createInstance ( { type : 'blank' , title, content } , options ) ;
60+ blank (
61+ title : string | TemplateRef < void > ,
62+ content : string | TemplateRef < void > ,
63+ options ?: NzNotificationDataOptions
64+ ) : NzNotificationRef {
65+ return this . create ( 'blank' , title , content , options ) ;
4666 }
4767
4868 create (
4969 type : 'success' | 'info' | 'warning' | 'error' | 'blank' | string ,
50- title : string ,
51- content : string ,
70+ title : string | TemplateRef < void > ,
71+ content : string | TemplateRef < void > ,
5272 options ?: NzNotificationDataOptions
5373 ) : NzNotificationRef {
5474 return this . createInstance ( { type, title, content } , options ) ;
0 commit comments