Angular: create is deprecated: use new Observable() instead

前端 未结 3 1271
长发绾君心
长发绾君心 2021-01-07 20:31

I recently updated my version of angular using ng update and when running ng lint

I am getting the error create is deprecated: use

3条回答
  •  孤街浪徒
    2021-01-07 20:54

    Pretty simple

    this.data$ = new Observable((observer: Observer) => {
      observer.next();
      observer.complete();
    });
    

提交回复
热议问题