Skip to content

2: Create page in sub-directory/folder [Feature request] #868

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

Closed
jgw96 opened this issue Mar 28, 2016 · 10 comments
Closed

2: Create page in sub-directory/folder [Feature request] #868

jgw96 opened this issue Mar 28, 2016 · 10 comments

Comments

@jgw96
Copy link
Contributor

jgw96 commented Mar 28, 2016

From @alexbainbridge on March 26, 2016 11:3

Short description of the problem:

When you have an app with a lot of pages, its easier to manage them in groups. e.g.

Concept A

  • page 1
  • page 2
  • page 3

Concept B

  • page 4
  • page 5
  • page 6

At the moment the ionic g page command creates pages (and their scss / js) at the top level "pages".

However I would like to do

ionic g page conceptA/pagename

and it to create pagename in pages > conceptA > pagename

Otherwise, I have to create a page, and then move it subsequently. This is a bit fiddly as quite a bit is auto-generated, so its not just a drag drop.

What behavior are you expecting?

Works as expected. Just this is an idea for an improvement

Which Ionic Version?
2

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 5.4.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: Not installed
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 7.3 Build version 7D175

Copied from original issue: ionic-team/ionic-framework#5949

@jgw96
Copy link
Contributor Author

jgw96 commented Mar 28, 2016

Hello! Thanks for opening an issue with us! As this feature request is more related to the ionic cli i will be moving this feature over there. Thanks again!

@roboflank
Copy link

Whats the status with this?

@k1ng440
Copy link

k1ng440 commented Feb 2, 2017

any status on this?

@Isabellle
Copy link

Isabellle commented Feb 17, 2017

Still not fixed :'(

@alexbainbridge
Copy link

I originally came up with this idea a year ago but since then I have changed my mind. I don't need it :)

  • very rarely generate a page anyway - much easier just to copy an existing one - chances are you as a developer have your own standard code that needs to be on each page - and by copying an existing one, you get that. There is nothing behind the scenes that requires a page to be created using generate, rather than copied from an existing..... (template, scss, ts)

  • regarding sub-folders, I use Webstorm, and it turns out if you drag a folder, it automatically sorts out everything you need to change (including app.module.ts and other imports), so even if you create in the wrong place, you can move anyway, painlessly

In summary, generate is not really needed much, and alternatives for creating / moving to a sub-folder exist. I can see why Ionic team left it, and thats fine by me!

So you all waiting for this - why do you actually need it? I thought I did but turns out I didn't

@cholnhial
Copy link

It would be helpful to have this feature, just being able to run ionic g page admin-login in a directory other than root directory.

@jmmclean
Copy link

jmmclean commented Oct 5, 2017

even something like angular cli, where i could do something like ionic g page modals/my-modal which would create a modal in the pages/modals/ directory

Since a modal acts like a page, but delineation would definitely be nice!

@imhoffd
Copy link
Contributor

imhoffd commented Oct 9, 2017

Hey all, thanks for the feature request. This would be a great addition and I think should fit in nicely with this more general issue about our generators: #2407

I am closing this in favor of the placeholder issue.

@imhoffd imhoffd closed this as completed Oct 9, 2017
@juandl
Copy link

juandl commented Jun 27, 2018

Nothing new?

@imhoffd
Copy link
Contributor

imhoffd commented Jun 27, 2018

@juandl This will be handled easily by the Angular CLI in v4. Please see #3019 to get started testing.

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

No branches or pull requests

10 participants