Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Name pattern of generated pages #969

Closed
RodolfoSilva opened this issue May 6, 2017 · 1 comment
Closed

Name pattern of generated pages #969

RodolfoSilva opened this issue May 6, 2017 · 1 comment

Comments

@RodolfoSilva
Copy link

Short description of the problem:

Ionic CLI generate page command doesn't add 'Page' sufix to the class name

What behavior are you expecting?

When generating new page through ionic cli, the class name of the .ts file generated should contains Page at the end of the name

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

/**
 * Generated class for the About page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */
@IonicPage()
@Component({
  selector: 'page-about',
  templateUrl: 'about.html',
})
export class AboutPage {

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

  ionViewDidLoad() {
    console.log('ionViewDidLoad AboutPage');
  }

}

Steps to reproduce:

  1. ionic start --v2 myApp blank
  2. ionic g page about
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

/**
 * Generated class for the About page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */
@IonicPage()
@Component({
  selector: 'page-about',
  templateUrl: 'about.html',
})
export class About {

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

  ionViewDidLoad() {
    console.log('ionViewDidLoad About');
  }

}

Which @ionic/app-scripts version are you using?

Your system information:

Cordova CLI: 6.5.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.10.3
Xcode version: Not installed

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Related issue driftyco/ionic#8320
Related issue driftyco/ionic-cli#1442

@danbucholtz
Copy link
Contributor

Sorry, we made this decision as a team. If you'd like, you can manually change the template files in node_modules/ionic-angular/templates.

Thanks,
Dan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants