init commit

This commit is contained in:
zhouyuejun
2018-10-26 11:33:25 +08:00
commit bec3bb9137
106 changed files with 29628 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import {Injectable} from '@angular/core';
import {Observable,Subject} from 'rxjs';
import {ToastConfig} from './toast-model';
/**
* toast服务
*/
@Injectable()
export class ToastService {
private toastSubject = new Subject<ToastConfig>();
constructor() {}
getToasts(): Observable<ToastConfig> {
return this.toastSubject;
}
toast(toastConfig: ToastConfig) {
this.toastSubject.next(toastConfig);
}
}