A generator for Yeoman. Generates a file structure for large AngularJS applications based on ng-boilerplate
Install generator-ngbp:
npm install -g generator-ngbpMake a new directory and cd into it:
mkdir my-awesome-app && cd $_Run yo ngbp, optionally passing an app name:
yo ngbp [app-name]Run grunt for building and grunt serve for development.
- ngbp (aka ngbp:app)
- ngbp:controller
Note: Generators are to be run from the root directory of your app.
yo ngbp [app name]Creates a new scaffold for a large AngularJS application, prompting you some configuration.
yo ngbp myAppyo ngbp:controller [module name].<controller name>Generates a new controller, if you specify a module name, then the controller will be geneated within the given module directory, elsewhere, the controller will be generated within common/controllers folder.
yo ngbp:controller fooProduces app/common/controllers/fooCtrl.js:
angular.module('myApp').controller('fooCtrl', function ($scope) {
/* Controller code */
});yo ngbp:controller profile.feedProduces app/app/profile/feedCtrl.js:
angular.module('profile').controller('feedCtrl', function ($scope) {
/* Controller code */
});yo ngbp:controller profile.edit.editFeedProduces app/app/profile/edit/editFeedCtrl.js:
angular.module('profile.edit').controller('editFeedCtrl', function ($scope) {
/* Controller code */
});