I have a question regarding the differences of the Atom typescript/angular compiler vs the one of Ionic.
I have a piece of code that connects to a web service:
import {Component, OnInit} from '@angular/core';
import {NavController} from 'ionic-angular';
import { HTTP_PROVIDERS, Http } from '@angular/http';
import { Module } from './module';
... some more not relevant code ...
getConfiguredModules(){
return new Promise(resolve => {
this._http.get('http://localhost:8080/rest/modules/configuredModules')
.map(res => <Array<Module>>(res.json()))
.subscribe(modules => {
this.configuredModules = modules;
resolve(this.configuredModules);
this.configuredModulesLoaded = true;
});
});
}
Atom compiler doesn't complain about this piece of code, but when I start Ionic 2 with 'ionic serve', I see the following error:
TypeScript error: pathToProject/modules.ts(26,14): Error TS2339: Property 'map' does not exist on type 'Observable'.
When I check the Angular version of Ionic with
npm info generator-angular-fullstack
I see:
beta: '4.0.0-beta.4'
My question is: How can I ensure Atom uses the same angular/typescript version as I see in npm?