More Related Content
What's hot
funcs, func expressions, closure, returning funcs, recursion, the stack -goph...funcs, func expressions, closure, returning funcs, recursion, the stack -goph...sangam biradar
ng-docs
- 3. How to run ng-docs
Step 1
Install
grunt-ngdocs
npm install grunt-ngdocs --save-
dev
or
gulp-ngdocs
npm install gulp-ngdocs --save-
dev
Step 2
Add annotations
/**
* @ngdoc
* @name
* @restrict
* @element
* @scope
*/
Step 3
Run
●Gruntfile.js
ngdocs: {
all: ['src/**/*.js']
}
●Gulpfile.js
gulp.task('ngdocs', [], function () {
var gulpDocs = require('gulp-ngdocs');
return gulp.src('path/to/src/*.js')
.pipe(gulpDocs.process())
.pipe(gulp.dest('./docs'));
});
- 7. Method
/**
* @ngdoc method
* @name formatData
* @methodOf dignio.service:chartServices
* @description
* @param {string} Type of graph
* @param {Array} Device measurement list
* @returns {Array} Array of objects.
*/