Angular js 2 'node_modules/rxjs/Observable"' has no exported member 'Observable'. import Observable

前端 未结 7 2111
醉酒成梦
醉酒成梦 2021-02-08 01:59

I am Getting below Error in Auth.d.ts file in Node_Modules Package.

[ts] Module \'node_modules/rxjs/Observable\"\' has no exported member \'Observable\'. import Observab

7条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-08 02:08

    if your angular version is 6 and above.

    use below:

    import { take, map } from "rxjs/operators";

    import { timer } from "rxjs/observable/timer";

    Install - npm install --save rxjs-compat

    Also user pipe with other funtions(Take,Map).

    timer(0, 10) .pipe(take(1000)) .pipe(map(() => x));

提交回复
热议问题