Angular 2 - Rxjs Intelligent with VS 2015 update 3

2019-09-11 04:08发布

I am learning the Angular 2.

I am following exactly the tutorial Tour of Heroes (https://angular.io/docs/ts/latest/tutorial/), I have everything work just fine.

Just one thing, it looks like the VS 2015 (with update 3) doesn't recognize extension functions from the Rxjs, can you advise how to fix it?

enter image description here

I have all imported as in the tutorial

// Observable class extensions
import 'rxjs/add/observable/of';
import 'rxjs/add/observable/throw';

// Observable operators
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/switchMap';

a note while checking the file rxjs/add/operator/debounce.d.ts the observable founder is not found, in fact the folder is there enter image description here

1条回答
可以哭但决不认输i
2楼-- · 2019-09-11 04:54

Try this:

import {Subject, Observable} from 'rxjs/Rx'; 
查看更多
登录 后发表回答