KreMat KreMat - 10 days ago 7
AngularJS Question

Blank Page with ‘@angular2/core’ instead of ‘@angular/core’

When I try to import my Component from @angular2/core instead of @angular/code the whole page doesn't work anymore. But If I use @angular/code I get compile errors, because

directives: [MapDirective]


is not a valid.

Any clue how to fix this?

import { Component } from '@angular/core';
import { MapDirective } from '../../components/map/map';

import { NavController } from 'ionic-angular';

@Component({
selector: 'page-home',
templateUrl: 'home.html',
directives: [MapDirective]
})
export class HomePage {

constructor(public navCtrl: NavController) {

}

}

Answer

This is how my page looks in ionic 2:

import { Component } from '@angular/core';

import { NavController } from 'ionic-angular';

@Component({
  selector: 'page-about',
  templateUrl: 'about.html'
})
export class AboutPage {

  constructor(public navCtrl: NavController) {

  }

}

there is no such thing as:

import {Component} from '@angular2/core';