随笔分类 -  Angular

报错:More than one module matches. Use skip-import option to skip importing the component into the closest module.
摘要:原文链接:报错:More than one module matches. Use skip-import option to skip importing the component into the closest module. – 每天进步一点点 用angualr的ng 指令创建组件时,执行 阅读全文

posted @ 2025-02-25 17:17 longkui 阅读(1) 评论(0) 推荐(0) 编辑

ng-zorro走马灯carousel轮播图不自动轮播问题
摘要:原文链接:ng-zorro走马灯carousel轮播图不自动轮播问题 – 每天进步一点点 angular项目(angular 7),ng-zorro(7.5.x) 使用carousel走马灯设置自动轮播图功能,从官网上copy下一段代码如下: <nz-carousel nzAutoPlay> <di 阅读全文

posted @ 2024-10-28 15:10 longkui 阅读(41) 评论(0) 推荐(0) 编辑

ng-zorro(Ant Design) nzPageIndex分页器bug
摘要:原文链接:ng-zorro(Ant Design) nzPageIndex分页器bug – 每天进步一点点 0.背景 前台使用nz-table配置上分页器,传入后台每次取固定量数据。调试的时候出现下面的bug 也就是点相应的页数,显示的页数是错误的。 错误的代码如下: 查阅了一些资料,加上自己尝试了 阅读全文

posted @ 2024-10-20 20:37 longkui 阅读(11) 评论(0) 推荐(0) 编辑

nz-select下拉框自适应宽度
摘要:原文链接:nz-select下拉框自适应宽度 – 每天进步一点点 数据如下: listOfData=[ { "name":"标题1", "id":"1" }, { "name":"标题12", "id":"2" }, { "name":"标题123", "id":"3" }, { "name":"标 阅读全文

posted @ 2024-10-20 20:27 longkui 阅读(54) 评论(0) 推荐(0) 编辑

angular (NG-ZORRO) input失去焦点事件nzBlur 无法触发
摘要:原文链接:angular (NG-ZORRO) input失去焦点事件nzBlur 无法触发 – 每天进步一点点 (longkui.site) 0.背景 angular项目使用ng-zorro前端组件,其中使用了nz-input进行输入数值,(ngModelChange)正常触发,(nzBlur)无 阅读全文

posted @ 2024-10-16 09:45 longkui 阅读(100) 评论(0) 推荐(0) 编辑

Only one structural directive can be applied
摘要:原文链接:Only one structural directive can be applied – 每天进步一点点 (longkui.site) 某天调试angular的时候,开始报这个错: Only one structural directive can be applied 或者 Can’ 阅读全文

posted @ 2024-10-15 09:36 longkui 阅读(2) 评论(0) 推荐(0) 编辑

angular中常见的管道及用法
摘要:原文链接:angular中常见的管道及用法 – 每天进步一点点 (longkui.site) 上一篇文章中,简单介绍了angular中自定义管道的使用: angular中如何自定义一个管道 这篇文章介绍一下,angular中自带的一些好用管道。 1.日期管道 {{ dateTime | date:' 阅读全文

posted @ 2024-10-15 09:32 longkui 阅读(46) 评论(0) 推荐(0) 编辑

More than one component matched on this element.
摘要:原文链接:More than one component matched on this element. – 每天进步一点点 (longkui.site) angular项目,把A组件导出以后,在B中直接通过标签的方式引用了A组件,类似于下面这样: <div> <demo1></demo1> </ 阅读全文

posted @ 2024-10-14 20:19 longkui 阅读(17) 评论(0) 推荐(0) 编辑

ERROR TypeError: this.nzData.slice is not a function
摘要:原文链接:ERROR TypeError: this.nzData.slice is not a function – 每天进步一点点 (longkui.site) 使用angular+ngzorro的nz-table渲染表格的时候报错: ERROR TypeError: this.nzData.s 阅读全文

posted @ 2024-06-20 09:06 longkui 阅读(11) 评论(0) 推荐(0) 编辑

angular踩坑:类型“HTMLElement”上不存在属性“selectedIndex”。ts(2339)
摘要:原文链接:angular踩坑:类型“HTMLElement”上不存在属性“selectedIndex”。ts(2339) – 每天进步一点点 (longkui.site) 0.背景 报错如下: 类型“HTMLElement”上不存在属性“selectedIndex” 类型“HTMLElement”上 阅读全文

posted @ 2024-06-19 08:53 longkui 阅读(34) 评论(0) 推荐(0) 编辑

NullInjectorError: No provider for NzModalRef!
摘要:原文链接:NullInjectorError: No provider for NzModalRef! – 每天进步一点点 (longkui.site) 0.背景 调试一个angular项目是出现了路由错误,报错没有找到这个路由。打开F12看报错信息,看到下面这些: ERROR Error: Unc 阅读全文

posted @ 2024-06-19 08:51 longkui 阅读(102) 评论(0) 推荐(0) 编辑

ERROR Error: No component factory found for Edit2Component. Did you add it to @NgModule.entryComponents?at noComponentFactoryError (core.js:9877:1)
摘要:原文链接:https://www.longkui.site/error/no-component/4843/ angular项目调用组件的时候开始报这个错误,大概的意思是NgModule中没有Edit2Component这个组件。 解决方法: 我们找到组件的xxxx.module.ts。在entry 阅读全文

posted @ 2023-10-11 16:12 longkui 阅读(83) 评论(0) 推荐(0) 编辑

ERROR in node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts(3,61): error TS1005: ‘,’ expected.
摘要:原文链接:https://www.longkui.site/error/error-in-node_modules-rxjs/4839/ angular项目,启动的时候报错。详细的报错如下: 这个报错的原因比较简单,rxjs的版本不对,我用的是angular7可能和rxjs版本不匹配。 解法方法也很 阅读全文

posted @ 2023-10-11 16:11 longkui 阅读(58) 评论(0) 推荐(0) 编辑

Property ‘includes’ does not exist on type ‘any[]’.
摘要:原文链接:https://www.longkui.site/error/property-includes-does-not-exist-on-type-any/4833/ angular项目,TypeScript。 项目正常跑的时候没有问题,打包项目(package)的时候开始报这个错误。 然后定 阅读全文

posted @ 2023-10-11 16:10 longkui 阅读(107) 评论(0) 推荐(0) 编辑

An unhandled exception occurred: Could not find the implementation for builder @angular-devkit/build-ng-packagr:build See ……
摘要:原文链接:https://www.longkui.site/error/angular-cli/4795/ 调试一个新的angula项目时,报上面的错误。断定基本是版本不匹配导致的。 看了看网上的一些信息说是升级一下 angular-cli的版本就行了。 但是升级后也不好用,后来发现, 不是要升级, 阅读全文

posted @ 2023-10-09 09:19 longkui 阅读(176) 评论(0) 推荐(0) 编辑

angular使用from动态设置验证器(clearValidators、setValidators)
摘要:原文链接:https://www.longkui.site/program/frontend/angularfrom/4787/ 0.背景 调试一个angular的form表单,根据条件动态赋予表单的权限验证。 主要介绍clearValidators和setValidators的用法。 1.代码 初 阅读全文

posted @ 2023-10-09 09:17 longkui 阅读(316) 评论(0) 推荐(0) 编辑

angular中的路由详解(3)—通过module和子路由来访问组件
摘要:原文链接:这里 0.前言 接着上一篇继续讲。实际开发中,业务复杂时,访问的路由可能会比较复杂。比如你一个组件的功能下面还包含其他的子功能,那么你访问的路由可能是下面这个样子: /city/shandong /city/beijing /city/henan ... ... 这个时候,可以看出,每个具 阅读全文

posted @ 2022-02-05 10:47 longkui 阅读(219) 评论(0) 推荐(0) 编辑

angular中的路由详解(2)—访问路由的一些姿势以及页面传参
摘要:原文链接:这里 0.前言 上一篇文章中简单介绍了angular中的默认路由,以及访问的方式,这篇文章继续介绍,我们一般可以通过哪些方式来经过路由访问页面。 用户除了通过直接访问URL链接之外,还有其他访问页面的方式。 1.通过路由链接(routerLink) 路由链接类似于超链接一样,直接写在HTM 阅读全文

posted @ 2022-02-05 10:46 longkui 阅读(227) 评论(0) 推荐(0) 编辑

nz-table中设置nzWidth遇到的问题
摘要:原文链接:这里 0.背景 本文组件:Ant Design of Angular 7.5.x 有一个比较长的报表需要展示,大概是下面这个样子,表头包含多行。 一开始看,觉得并不难,10分钟把表头构建出来了。如下: 然后问题来了。 问题1:没有数据的情况下,表头不能滑动。然后加上数据试下效果: 结果更差 阅读全文

posted @ 2022-02-02 18:05 longkui 阅读(385) 评论(0) 推荐(0) 编辑

If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as ‘standalone’ in ngModelOptions.
摘要:原文链接:这里 0.背景 angular项目,用的NG-ZORRO 一个简单的表单提交页面,本来不想用form,直接写的row和col。但是页面太丑了,加上form吧,开始报错(其实就是不熟练)。 1.报错原因及解决方法 我的当时的非主流代码如下: <form nz-form> <nz-row> < 阅读全文

posted @ 2022-02-02 16:18 longkui 阅读(156) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示