Angular 2-具有VS 2015更新3的Rxjs Intelligent [英] Angular 2 - Rxjs Intelligent with VS 2015 update 3

查看:38
本文介绍了Angular 2-具有VS 2015更新3的Rxjs Intelligent的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习Angular 2.

我正在严格按照《英雄之旅》教程(

我已按照教程中的说明全部导入

 //可观察到的类扩展导入'rxjs/add/observable/of';导入'rxjs/add/observable/throw';//可观察的运算符导入'rxjs/add/operator/catch';导入'rxjs/add/operator/debounceTime';导入'rxjs/add/operator/distinctUntilChanged';导入'rxjs/add/operator/do';导入'rxjs/add/operator/filter';导入'rxjs/add/operator/map';导入'rxjs/add/operator/switchMap';  

检查文件rxjs/add/operator/debounce.d.ts时的注意事项找不到可观察的创始人,实际上文件夹在那里

解决方案

尝试一下:

 从'rxjs/Rx'导入{Subject,Observable}; 

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?

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

解决方案

Try this:

import {Subject, Observable} from 'rxjs/Rx'; 

这篇关于Angular 2-具有VS 2015更新3的Rxjs Intelligent的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆