anglar cli的 rxjs_1.of is not a function

按照官网敲例子遇到 rxjs_1.of is not a function

import { Observable,of } from 'rxjs';

  

改为

import { Observable} from 'rxjs/Observable';
import { of } from 'rxjs/observable/of';
getHeroes(): Observable<Hero[]> {
return of(HEROES);
}

解决不在报错

原文地址:https://www.cnblogs.com/fuzitu/p/8930263.html