
nodejs
文章平均质量分 66
蒋桐城
泛Java技术爱好,php、Python、Angular、Vue等。
展开
-
Angular自动生成组件文档-基于Compodoc
官方文档https://compodoc.app/安装npm install -g @compodoc/compodoc项目文件根目录下创建tsconfig.doc.json文件{ "include": ["src/**/*.ts"], "exclude": ["src/test.ts", "src/**/*.spec.ts", "src/app/file-to-exclude.ts"]}修改根目录下的package.json文件"scripts": { "compodoc原创 2021-12-19 20:11:13 · 673 阅读 · 0 评论 -
angular-cli styles 全局样式引用无效
开发环境webstormnodeangularangular-clinpm(cnpm)使用angular-cli 引入全局css样式:"styles": [ "styles.css", "../node_modules/bootstrap/dist/css/bootstrap.css" ],发现页面没有加载任何bootstrap样式,但是npm start时没有报错,能正常原创 2017-11-27 23:39:46 · 4715 阅读 · 5 评论 -
npm install Unexpected token in JSON at position XXX
问题描述执行npm install命令时出错,查看日志发现: Unexpected token < in JSON at position 183718解决方法删除根目录下package-lock.json文件参考Install error: Unexpected token < in JSON at position 35 #17340...原创 2018-05-05 15:25:15 · 10205 阅读 · 1 评论 -
Windows服务器Jenkins部署Angular项目执行npm ng 命令异常
场景描述构建一个自由风格的软件项目,选择对应的源码管理。每次构建时,Jenkins自动将最新的代码更新到workspace。然后通过增加构建步骤,执行npm install和ng build等命令,完成自动发布工作。问题描述增加构建步骤,选择“Execute Windows batch command”,增加npm install命令。构建时出错如下: C:\Jenkins\w...原创 2018-05-05 15:40:32 · 2225 阅读 · 0 评论 -
Vue子组件传值 Expected String, got Function.异常
现象父组件引入子组件,子组件props中有title属性,这个title需要通过http请求确定。父组件中data定义:data: function () { return { title: String } }子组件定义:<p-table v-bind:title="$data.title"></p-table>解决...原创 2018-07-25 23:03:05 · 8780 阅读 · 0 评论 -
Vue Cannot read property 'xxx' of undefined解决办法
问题场景使用{{}}文本插值方式,通过.级联显示内容。如下代码,foo通过后端接口返回。后端内容返回之前,控制台会Cannot read property ‘xxx’ of undefined的错误。<div> <h1>{{ foo.title }}</h1> <p>{{ foo.description }}</p><...原创 2019-01-15 21:55:32 · 141219 阅读 · 6 评论