Skip to content

Generating controllers in subdirectories #242

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
kosz opened this issue May 31, 2014 · 6 comments
Closed

Generating controllers in subdirectories #242

kosz opened this issue May 31, 2014 · 6 comments

Comments

@kosz
Copy link

kosz commented May 31, 2014

I'm having a very hard time trying to generate a controller in a subdirectory. I wouldn't think it would be realistic to expect a complete app to dump all it's controllers in the /controllers directory without subdirectories.

Currently when trying something like :

yo angular-fullstack:controller subdir/todo I get :

  1. a controller created in the right place with the right file name : app/controllers/subdir/todo.coffee and an include in the index.html
  2. the controller has the wrong name : SubdirTodoCtrl
  3. the controller .js file is never served. instead if I try to load localhost:9000/app/controllers/subdir/todo.js, grunt loads the homepage ...

Furthermore ...

trying to create a controller in this location, by hand, gives the same results : The .js file when served through grunt has the html content of index.html. This .js file has the right content when opened in an editor.

Any thoughts ?

@kosz kosz closed this as completed Jun 2, 2014
@kosz kosz reopened this Jun 2, 2014
@kosz kosz closed this as completed Jun 2, 2014
@kosz kosz reopened this Jun 2, 2014
@kosz
Copy link
Author

kosz commented Jun 4, 2014

I'd appreciate it if someone can confirm if this is indeed an issue, or if I'm doing something wrong

@JaKXz
Copy link
Collaborator

JaKXz commented Jun 20, 2014

@kosz I apologize for the delayed response. I can confirm this is an issue with v1.4.3, but, with #192 there are major structural changes in the works.

@kosz
Copy link
Author

kosz commented Jun 23, 2014

@JaKXz Thanks for clarifying that. I guess the project is still a bit young to be fully reliable.
I'm also slightly disturbed about the massive overhaul described in 2.0. I mean it all looks great, but will it be backwards compatible ? Or if i've started a project with the current angular-fullstack version, I would be looking at changing a lot of things, to move to 2.0 and have the required features ( such as this one ) work ?

@kosz kosz closed this as completed Jun 23, 2014
@JaKXz
Copy link
Collaborator

JaKXz commented Jun 23, 2014

@kosz well, you can give the new generator a shot, and report bugs which would be awesome of you. If your project isn't too big I'd just move everything over manually, but, we will be working on some sort of migration guide.

@kosz
Copy link
Author

kosz commented Jun 23, 2014

@JaKXz sure thing i can play around with it and see what I can find. Where would I log bugs for this pull requests ? Just comment on the PR page or ?

I guess there may be tons of small details, like the styling of the buttons on the login page, where would the small stuff go.

Also another question : I didn't check yet, but was just wondering, does 2.0 bring us the ability to have a controller or view automatically included in the index .html/.jade files ? This and not automatically including newly installed bower packages was quite confusing for me at first, having come from a rails background where the asset pipeline automates all these things for me.

Another note that i'd have to make after my first 5 mins of using 2.0.0 is that the app.scss file is in /client/app , next to app.coffee . Personally I find this a bit odd, having scripts and styles in the same dir.

Also as I'm checking through stuff right now, it looks like an index.html file was created, even though I've specified for the project to use jade.

In fact , looking through dirs more and it looks like .coffee .jade and .scss files reside in the same directories. This is pretty weird looking to me, not sure if it's a bug, or if it's how you guys want it

@JaKXz
Copy link
Collaborator

JaKXz commented Jun 24, 2014

I think the best thing to do would be to make new issues and indicate that you're testing the 2.0.0 branch. Thanks!

To answer your questions, I suggest you go through #192 in detail.

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

3 participants