Angular: create is deprecated: use new Observable() instead
Pretty simple
this.data$ = new Observable((observer: Observer) => {
observer.next();
observer.complete();
});
Or you can use just
this.data$ = of(this.model);
In 2021 it is changed.
new Observable((observer: Observer<object>) => {
observer.next(data);
});
instead of
new Observable((observer: Observer) => {
observer.next();
observer.complete();
});