This project is generated with yo angular generator version 0.15.1.
Run grunt
for building and grunt serve
for preview.
Running grunt test
will run the unit tests with karma.
Install yo
, grunt-cli
, bower
, generator-angular
and generator-karma
:
npm install -g grunt-cli bower yo generator-karma generator-angular
Generates a controller and view, and configures a route in app/scripts/app.js
connecting them.
Example:
yo angular:route myroute
Produces app/scripts/controllers/myroute.js
:
angular.module('myMod').controller('MyrouteCtrl', function ($scope) {
// ...
});
Produces app/views/myroute.html
:
<p>This is the myroute view</p>
Configures a route in app/scripts/app.js
connecting them.
.when('/myroute', {
templateUrl: 'views/myroute.html',
controller: 'MyrouteCtrl',
controllerAs: 'myroute'
})
Generates test test/spec/controllers/myroute.js
:
describe('Controller: MyrouteCtrl', function () {
// ...
}
For more AngularJS generator see https://github.com/yeoman/generator-angular.