I created my Angular application using a specific module name and now I have decided to change it.
so when I do
yo angular:controller myController
it creates
angular.module('MyTestModule')
Where is Yo
looking to pick this up, anyway of updating it ??
Thanks
In the current version (Yeoman 1.0.4, generator-angular 0.4.0) the name seems to be taken from the "name"
property in the file bower.json
.
There's an extra "l" in "controlller myController" in your description above, which will default to causing yeoman (or yo) to create an entire angular deployment, not just the controller alone. In any case its picking up part of that name from the directory of your deployment. So for an example I did this:
mkdir yotest
cd yotest
npm install -g yo grunt-cli bower generator-angular
yo angular:controller myController
vi app/scripts/controllers/myController.js
And notice the name of my controller module:
...
angular.module('yotestApp')
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With