generator-angular-ui-router icon indicating copy to clipboard operation
generator-angular-ui-router copied to clipboard

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

Open bmwertman opened this issue 11 years ago • 2 comments

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"

bmwertman avatar May 13 '14 14:05 bmwertman

Yes .Me too faced same issue

arepalli-praveenkumar avatar Jun 07 '14 15:06 arepalli-praveenkumar

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!

emaV avatar Nov 09 '14 15:11 emaV