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

New states generated above '$stateProvider' in app.js Angular module #14

Open
bmwertman opened this issue May 13, 2014 · 2 comments
Open

Comments

@bmwertman
Copy link

When new routes are generated using "yo angular-ui-router:route myroute" the new states are generated above '$stateProvider' in the app.js Angular module.

This causes the following error:
"Uncaught Error: No module: myappnameApp"

@arepalli-praveenkumar
Copy link

Yes .Me too faced same issue

@emaV
Copy link

emaV commented Nov 9, 2014

The fix works for javascript, not for coffee indeed.

It uses a different needle just below the last .state in the template. Even it reads as a comment for the following line the indentation is kept as the previous lines so new state added keeps the right indentation.

You can make it work in your installed code adding the line

// ui-otherwise

just below your last state and patching your local generator (in my Mac is /usr/local/lib/node_modules/generator-angular-ui-router. Please note the indentation!

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