热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Angular学习个人遇见的问题分享

个人遇见的一些问题写完app-heros遇见的报错Failedtocompile.srcappapp.component.html:2:1-errorNG8001:heroesi

个人遇见的一些问题
写完app-heros遇见的报错

Failed to compile.src/app/app.component.html:2:1 - error NG8001: 'heroes' is not a known element:
1. If 'heroes' is an Angular component, then verify that it is part of this module.
2. To allow any element add &#39;NO_ERRORS_SCHEMA&#39; to the &#39;&#64;NgModule.schemas&#39; of this component.2 <heroes></heroes>~~~~~~~~src/app/app.component.ts:5:165 templateUrl: &#39;./app.component.html&#39;,~~~~~~~~~~~~~~~~~~~~~~Error occurs in the template of component AppComponent.

查了半天是一个很简单的位置书写错误
在这里插入图片描述
在这里插入图片描述
对比一下粗心大意了

angular报错信息之 Can’t bind to ‘ngForOf’ since it isn’t a known property of ‘tr’.
这个就是缺少了一个angulaer模块

import { CommonModule }from&#39;&#64;angular/common&#39;;

在这里插入图片描述
在module.ts引入一下问题就解决了

蚂蚁金服的坑
在这里插入图片描述
所有东西配置完之后你发现前面的单选框还是不出现&#xff0c;那是因为官方的例子没写全
缺少一个显示控件&#xff0c;一辈子也显示不出来啊 nzShowCheckbox
在这里插入图片描述


推荐阅读
author-avatar
手机用户2602938293
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有