Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 如何增加ngxtoastr的显示时间_Angular_Typescript_Angular Material - Fatal编程技术网

Angular 如何增加ngxtoastr的显示时间

Angular 如何增加ngxtoastr的显示时间,angular,typescript,angular-material,Angular,Typescript,Angular Material,我想增加ngx toastr的显示时间。 我在API的成功消息中使用toastr.success this.toastr.success(this.successMessage); 该函数的第3个参数可以更改为timeOut作为覆盖JSON值 以毫秒为单位 this.toastr.success(this.successMessage, null, {timeOut: 5000}); 看来这是一个大致的过程 success(message?: string, title?: string

我想增加ngx toastr的显示时间。 我在API的成功消息中使用toastr.success

 this.toastr.success(this.successMessage);

该函数的第3个参数可以更改为timeOut作为覆盖JSON值

以毫秒为单位

 this.toastr.success(this.successMessage, null, {timeOut: 5000});
看来这是一个大致的过程

success(message?: string, title?: string, override: Partial<IndividualConfig> = {})
 this.toastr.success(this.successMessage, null, { timeOut: 10000 }); // 10 seconds