├── app │ ├── 404.html │ ├── favicon.ico │ ├── images │ ├── index.html │ ├── robots.txt │ ├── scripts │ │ ├── app.js │ │ └── controllers │ │ └── main.js │ ├── styles │ │ └── main.scss │ └── views │ └── main.html └── test │ ├── runner.html │ └── spec │ └── controllers │ └── main.js ├── bower.json ├── Gruntfile.js ├── karma.conf.js ├── karma-e2e.conf.js ├── package.json
angular.module('MyApp')
.controller('HomeCtrl', function ($scope) {
// Home Controller Logic
});
angular.module('MyApp')
.controller('HomeCtrl', ['$scope', function ($scope) {
// Home Controller Logic
}]);
<!-- templates/home.html -->
<section>
<p>Hello {{ user }}</p>
</section>
angular.module('MyApp').run(function ($templateCahce) {
$templateCache.put('templates/home.html',
'<section><p>Hello {{ user }}</p></section>');
});
Parse the in-code documentation of your project and generates an AngularJS-like documentation page.
/**
* @ngdoc directive
* @name MyAppApp.directive:preventDefault
* @element a
* @restrict AE
* @function
*
* @description This directive prevents the default on links click
*
<doc:example module="MyAppApp">
<doc:source>
<p>
<a prevent-default href="/casa">Click me</a>
</p>
</doc:source>
</doc:example>
*/
scope = angular.element($0).scope();