Angular5 tslint错误:The selector of the component “XXXComponent” should be used as element
错误描述
在项目中自己封装了一个 select
组件
@Component({
selector: '[app-choosen-select]',
templateUrl: './selectcommon.component.html',
styleUrls: ['./style.scss']
})
export class SelectCommonComponent implements OnInit, AfterViewInit, OnDestroy {
ts编译报错。
解决方案
修改tslint.json
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
改为
"component-selector": [
true,
["element","attribute"],
"app",
"kebab-case"
],
组件引用
<div app-choosen-select [options]="groupOptions" class="cpu-select-round"></div>
Angular5 tslint错误:The selector of the component “XXXComponent” should be used as element的更多相关文章
- [Angular + TsLint] Disable directive selector tslint error
@Directive({ // tslint:disable-next-line:directive-selector selector: '[scrollable]' })
- 用VSCode开发一个asp.net core 2.0+angular 5项目(4): Angular5全局错误处理
第一部分: http://www.cnblogs.com/cgzl/p/8478993.html 第二部分: http://www.cnblogs.com/cgzl/p/8481825.html 第三 ...
- tomcat启动时错误:Failed to start component [StandardEngine[Catalina].StandardHost[localhost].错误
今天第一次遇到Failed to start component [StandardEngine[Catalina].StandardHost[localhost].错误,并且在错误提示的后半段出现了 ...
- 启动webpack-dev-server错误,ERROR in main.js from UglifyJs Unexpected token: name «element», expected: punc «;»
启动webpack-dev-server出现以下错误 ERROR in main.js from UglifyJsUnexpected token: name «element», expected: ...
- Angular: 执行ng lint后如何快速修改错误
当我第一次被分配到“修正执行ng lint语句后的错误”这项任务前,我就被导师提前告知这是一个很无聊的任务,当我开始后,我发现其实有一些办法可以加快这个无聊单调的工作.接下来,我就分享一下我的经验. ...
- jquery.validate使用 - 自定义错误信息
自定义错误消息的显示方式 默认情况下,验证提示信息用label元素来显示, 并且会添加css class, 通过css可以很方便设置出错控件以及错误信息的显示方式. /* 输入控件验证出错*/form ...
- jquery validate 指定错误内容的位置
一.默认的提示 messages: { required: "This field is required.", remote: "Please fix this fie ...
- 将从数组中取到的字符串赋值给了UIImage导致的错误
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantStr ...
- Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined
错误: 解决办法: 2.0已经没有map了,使用npm install vue-router@0.7.13 命令兼容1.0版本vue 但是安装完之后会出现一个错误: Cannot read prope ...
随机推荐
- 在服务端中,读取properties资源文件中的数据
1.获取到资源的路径 2.读取数据 //properties文件对象 Properties properties = new Properties(); //通过HttpServletRequest ...
- mybatis 关联查询和嵌套查询的简单示例
两个表: Customer 顾客表 create table if not exists customer( customer_id int primary key auto_increment, f ...
- Acwing-98-分形之城(递推,数学)
链接: https://www.acwing.com/problem/content/description/100/ 题意: 城市的规划在城市建设中是个大问题. 不幸的是,很多城市在开始建设的时候并 ...
- zabbix-server一键部署
最近想写一个zabbix脚本,自己尝试几次,能够实现,但是太糙了,在github上发现一个很好,谢谢作者脚本作者:火星小刘 web:www.huoxingxiaoliu.com email:xtlyk ...
- 15.DRF学习以及相关源码阅读
1.http请求协议 代码很枯燥,结果和奇妙. 1.cbv django.vuews import View classs LoginView(View): def get(self,requset) ...
- testNG之测试报告
原文:https://www.cnblogs.com/yuan-yuan/p/4503524.html 测试报告 执行完测试用例之后,会在项目的test-output(默认目录)下生成测试报告 打开i ...
- CSS 的伪元素是什么?
CSS伪元素是用来添加一些选择器的特殊效果.用于:向某个选择器中的文字的首行. ㈠语法 ①伪元素的语法: selector:pseudo-element {property:value;} ②CSS类 ...
- TTTTTTTTTT TTTTT CF 229C 三角形数量
题意: 有一个无向完全图(任意两个节点之间均有一条边),包含 n(1<=n<=10^6) 个顶点,现在有两个人A 和 B,A从这个无向图中取出 m(0<=m<=10^6) 条边 ...
- String类型中"=="和"equals"的区别
"=="比较的是两个字符串的内存地址. "equals"比较的是两个字符串的实际值. 例子1. String s1="abc"; Stri ...
- confluence部署
confluence -- 团队文档的管理平台. 首先要在confluence官网买key. 部署 安装jdk 1.8 环境 查看机器是否自带 java -version,没有再安装. yum ins ...