Fresh new Ionic2 Typescript project started from the SideMenu template, i can’t seem to import any angular2 stuff from the page.
…
import {Page} from ‘ionic-angular’; //OK
import {Http} from ‘angular2/http’; //error: cannot find module
import {Component} from ‘angular2/core’; //error: cannot find module
…
From getting-started.ts in the template, i’ve tried a lot of combinations…
…
import {Http} from ‘@angular2/http’; //error: cannot find module
import {Http} from ‘./…/…/node_modules/@angular2/http’; //error: cannot find module
import {Http} from ‘./…/…/…/node_modules/@angular2/http’; //error: cannot find module
import {Http} from ‘/node_modules/@angular2/http’; //error: cannot find module
import {Http} from ‘node_modules/@angular2/http’; //error: cannot find module
…
None of this work.
Even added “moduleResolution”: “node” in tsconfig.json didn’t work.
Any other ideas? Thanks in advance.
I have a similar problem with a fresh sidemenu app with the Ionic 2.1.0 RC0 CLI. The default app uses @angular/core and still getting ‘missing’ errors. From app.component.ts:
import { Component, ViewChild } from ‘@angular/core’;