I seem to be encountering an issue with Angular 2 and Typescript. Every time I attempt to gulp build, I keep getting the same errors. I've tried numerous solutions, including adding the <reference> tags in the files. Any suggestions on what steps to take next?
(7,26): error TS2307: Cannot find module 'rxjs/Rx'./Users/macbook/workspace/rss/src/app/services/rootscope.ts (8,46): error TS2307: Cannot find module 'angular2/core'./Users/macbook/workspace/rss/src/app/services/rootscope.ts (17,48): error TS2304: Cannot find name 'Observer'./Users/macbook/workspace/rss/src/app/services/api.ts (6,26): error TS2307: Cannot find module 'angular2/core'./Users/macbook/workspace/rss/src/app/services/api.ts (7,27): error TS2307: Cannot find module 'angular2/http'./Users/macbook/workspace/rss/src/app/services/api.ts (15,13): error TS2339: Property 'http' does not exist on type 'API'./Users/macbook/workspace/rss/src/app/services/api.ts (19,20): error TS2339: Property 'http' does not exist on type 'API'./Users/macbook/workspace/rss/src/app/services/api.ts (23,20): error TS2339: Property 'http' does not exist on type 'API'../src/app/app.ts (6,25): error TS2307: Cannot find module 'angular2/platform/browser'../src/app/app.ts (7,25): error TS2307: Cannot find module 'angular2/core'../src/app/app.ts (8,47): error TS2307: Cannot find module 'angular2/http'.
rootscope.ts
/// <reference path="../../../node_modules/reflect-metadata/reflect- metadata.d.ts" />
/// <reference path="../../../node_modules/angular2/typings/browser.d.ts" />
/// <reference path="../../../node_modules/angular2/core.d.ts" />
/// <reference path="../../../node_modules/angular2/http.d.ts" />
/// <reference path="../../../node_modules/rxjs/Rx.d.ts" />
import {Observable} from "rxjs/Rx";
import {Injectable,EventEmitter,Output} from "angular2/core";
@Injectable()
export class ROOT_SCOPE {
data: any;
dataChange: Observable<any>;
@Output dataChangeObserver: EventEmitter=new EventEmitter();
constructor() {
this.dataChange = new Observable((observer:Observer) => {
this.dataChangeObserver = observer;
});
}
set(data:any) {
this.data = data;
this.dataChangeObserver.next(this.data);
}
}