Issue with generate page strange tag "$IONICPAGE"


I started a new project with ionic and i want to generate new page with CLI : ionic generate page Contact
but i had a strange tags like that : $IMPORTSTATEMENT and $IONICPAGE

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

 * Generated class for the Contact page.
 * See for more info
 * on Ionic pages and navigation.
  selector: 'page-contact',
  templateUrl: 'contact.html',
export class Contact {

  constructor(public navCtrl: NavController, public navParams: NavParams) {

  ionViewDidLoad() {
    console.log('ionViewDidLoad Contact');


My ionic info cli:

Your system information:

Cordova CLI: 6.5.0 
Ionic Framework Version: 3.6.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 2.1.3
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 3.10
Node Version: v6.9.4
Xcode version: Not installed

What exactly are the commands you used?

The command is :

ionic g page

I have the same issue and another thing that is happening is that:

import { NavController, NavParams } from 'ionic-angular';

is missing when the page is created, thus the IDE points some error in the syntax.
See the screenshoot:


@ionic/cli-plugin-ionic-angular : 1.4.0
@ionic/cli-utils : 1.6.0
ionic (Ionic CLI) : 3.6.0
@ionic/app-scripts : 2.0.2
Ionic Framework : ionic-angular 3.6.0


Node  : v8.2.1
OS    : macOS Sierra
Xcode : Xcode 7.2.1 Build version 7C1002
npm   : 5.3.0

This seems like a CLI bug for the new generate functionality. You should have a look around here, and if you don’t find anything, create a new issue about it:

Yes the same issue me too i don’t have that import

import { NavController, NavParams } from 'ionic-angular';

The solution is upgrade to the new CLI V3.

How to install new CLI

Hmm, @ebosques seems to have a current CLI…

My Ionic info

    @ionic/cli-utils  : 1.7.0
    ionic (Ionic CLI) : 3.7.0


    Android SDK Tools : 25.2.3
    Node              : v6.9.4
    OS                : Linux 3.10
    npm               : 3.10.10