随笔分类 -  前端 / angular

摘要:一、安装angular cli npm install -g @angular/cli 二、使用angular cli新建项目 ng new test 三、使用npm引入ng-devui npm i ng-devui # 可选,字体图标库, 部分Demo依赖此字体库 # npm i @devui-d 阅读全文
posted @ 2023-06-28 19:07 jamstack 阅读(220) 评论(0) 推荐(0)
摘要:一、安装compodoc npm install --save-dev @compodoc/compodoc 没有使用全局安装,生成文档的时候,需要执行 ./node_modules/.bin/compodoc -p tsconfig.app.json -s -r 9000 编辑package.js 阅读全文
posted @ 2022-04-30 22:07 jamstack 阅读(171) 评论(0) 推荐(0)
摘要:https://thecodemon.com/angular-oauth2-or-open-id-connect-using-angular-oauth2-oidc-tutorial-with-example-application/ 阅读全文
posted @ 2022-04-30 19:46 jamstack 阅读(85) 评论(0) 推荐(0)
摘要:背景: get请求/sanctum/csrf-cookie,常用于登录,代码如下: return this.http.get<any>(this.apiURL + ':' + this.port + '/sanctum/csrf-cookie', { withCredentials: true }) 阅读全文
posted @ 2022-04-28 14:46 jamstack 阅读(745) 评论(0) 推荐(0)
摘要:Short answer: withCredentials() makes your browser include cookies and authentication headers in your XHR request. If your service depends on any cook 阅读全文
posted @ 2022-04-28 14:11 jamstack 阅读(27) 评论(0) 推荐(0)
摘要:一、升级angular 8 到 angular 8 的最新版本,再升级到 angular 9,依次升级到 angular 13 ng update @angular/core@8 @angular/cli@8ng update @angular/cli@9 @angular/core@9ng upd 阅读全文
posted @ 2022-04-23 00:17 jamstack 阅读(644) 评论(0) 推荐(0)
摘要:背景: Angular 8.3.20 + Tailwind CSS 3.0.24 一、npm 安装 Tailwind CSS npm install -D tailwindcss 二、初始化 Tailwind CSS npx tailwindcss init 初始化以后,会在project根目录下生 阅读全文
posted @ 2022-04-22 23:15 jamstack 阅读(344) 评论(0) 推荐(0)
摘要:一、创建component组件 ng generate component test/hello 二、创建service服务 ng generate service service/task 三、创建model 与上面不同的是,angular的model,叫interface更贴切,因此,命令应该如 阅读全文
posted @ 2022-04-18 20:10 jamstack 阅读(86) 评论(0) 推荐(0)
摘要:参考资料 Get data from a server 阅读全文
posted @ 2022-04-18 19:59 jamstack 阅读(102) 评论(0) 推荐(0)
摘要:背景: Debian 10 + Angular 11 由于官方提供的demo是基于Angular 7的,已经过时了,其他能查到的资料大多是基于Vue的,因此,使用Angular 11 自己总结了一套方法,最终封装的甘特图组件效果如下: 第一步: npm install dhtmlx-gantt -- 阅读全文
posted @ 2022-04-18 19:14 jamstack 阅读(548) 评论(0) 推荐(0)
摘要:父组件向子组件传值,通过在子组件定义@Input接收父组件传过来的内容 子组件向父组件传值,通过在子组件定义@Output和EventEmitter向父组件发送要传递的内容 也可以通过rxjs实现组件间传值,使用rxjs在组件间传值最灵活,但是相对来说也最麻烦 参考资料 https://angula 阅读全文
posted @ 2022-04-14 22:44 jamstack 阅读(18) 评论(0) 推荐(0)