我正在尝试使用ngdocs和grunt来记录我的Angular WebApp。我想知道有没有一种方法来记录路由配置,因为我觉得我的WebApp路由系统相当复杂,它的文档部分需要一些注意。
有没有什么办法,我可以让它在控制器,工厂等的水平上。
我能把它放在下面吗?
/**
* @ngdoc controller
* @name shippingSolutionApp.controller:MainCtrl
* @description
* # MainCtrl
* <strong>PAGE LEVEL CONTROLLER:</strong> This is a page level controller.
*
* This is a empty controller of shippingSolutionApp. Any business logic to initiate the app must fall here when required.
*
* This holds the initialization process for both the sub-child WebApps: Admin Dashboard and User Dashboard
* @requires
* $scope
*/谢谢,安吉特
发布于 2016-05-04 22:04:24
要不要像这样的东西让你开始呢?
这不是一个很好的答案,因为我还没有写过关于为@description写什么的文章,但希望这说明了一种开始使用ngdocs来记录有关路由的内容的方法。
/**
* @ngdoc overview
* @name app.config:routes
* @description
* Your description here.
*/
angular
.module('app')
.config(['$routeProvider', '$locationProvider', config]);
function config ($routeProvider, $locationProvider) {
$routeProvider
.when(
templateUrl : 'app/example.view.html',
controllerAs: 'example',
controller : 'ExampleController'
)
.otherwise({
redirectTo: '/'
});
}https://stackoverflow.com/questions/29983431
复制相似问题