无法构建angularjs doc(不知道如何格式化@ngdoc:方法)

 沐月954_290 发布于 2023-01-15 15:00

我有一些带有一些文档的服务,但是当我尝试使用grunt-ngdocs构建文档时,它失败了:

Warning: Don't know how to format @ngdoc: method Use --force to continue.

这是我想要做的

(function(angular) {
    'use strict';

    angular.module('services.base64', [])
    .factory(
            'Base64',
            [function() {

                /**
                 * @ngdoc service
                 * @name Base64
                 * @module services.base64
                 * @description Provides encoding a string into base64, and decode base64 to a string
                 */
                return {
                    /**
                     * @ngdoc method
                     * @name Base64#encode
                     * @param {string}
                     *            input the string you want to encode as base64
                     * @returns {string} the base64 encoded string
                     */
                    encode : function(input) {
                        //...
                    },

                    /**
                     * @ngdoc method
                     * @name Base64#decode
                     * @param {string}
                     *            input the base64 encoded string
                     * @returns {string} the decoded string
                     */
                    decode : function(input) {
                        //...
                    }
                };
            }]);
}(angular));

我确定我错过了一些简单的东西......

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有