Error: Property timer doesn't exist on type typeof Observable

前端 未结 4 565
轻奢々
轻奢々 2021-02-07 11:40

The code is below

import {Component} from \'angular2/core\';
import {Observable} from \'rxjs/Rx\';

@Component({
selector: \'my-app\',
template: \'Ticks (every s         


        
4条回答
  •  无人共我
    2021-02-07 12:06

    all you need to do is to import Observable from the root folder of library because older versions of rxjs does not provide complete Observable class in rxjs/Observable

    import {Observable} from 'rxjs';
    

提交回复
热议问题