Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RC-0: Name pattern of generated pages #8320

Closed
ecureuill opened this issue Sep 29, 2016 · 4 comments
Closed

RC-0: Name pattern of generated pages #8320

ecureuill opened this issue Sep 29, 2016 · 4 comments

Comments

@ecureuill
Copy link

ecureuill commented Sep 29, 2016

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

@Component({
  templateUrl: 'build/pages/home/home.html',
})
export class HomePage {}

Steps to reproduce:

  1. ionic start myApp --v2
  2. ionic build
  3. ionic g page myPage
@Component({
  templateUrl: 'build/pages/home/home.html',
})
export class Home {}

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

Like in ionic beta, set "Page" to the ClassName variable

function PageGenerator(options) {
  Generator.call(this, options);
  this.directory = 'pages';
  this.jsClassName += 'Page';
}

Which Ionic Version? 1.x or 2.x
2 RC0

Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: Debian Description: Debian GNU/Linux 8.6 (jessie)
Node Version: v4.5.0

@ecureuill ecureuill changed the title Ionic CLI class name pattern of pages RC-0: Name pattern of generated pages Sep 29, 2016
@ramonornela
Copy link
Contributor

Not see problem Uninstall Ionic CLI first, and then reinstall

Important: if you have installed the beta cli you should run npm uninstall -g ionic first. You need version 2.1.0 for this release. Check your cli version by running ionic -v in the command line.

Thanks

@jgw96
Copy link
Contributor

jgw96 commented Sep 30, 2016

This issue was moved to ionic-team/ionic-cli#1442

@jgw96 jgw96 closed this as completed Sep 30, 2016
@jgw96
Copy link
Contributor

jgw96 commented Sep 30, 2016

Hello, thanks for opening an issue with us! I can reproduce with Ionic cli 2.1.0 and have moved this issue to the appropriate repo.

@ramonornela
Copy link
Contributor

ramonornela commented Oct 4, 2016

@jgw96 when you are some time and be able to review the pull #8368 😉

Thanks

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
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

3 participants