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 ...
随机推荐
- PowerDesigner 生成SQL Server 2005 注释脚本
--生成数据表的注释EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=[%R%?[N]]%.q:COMMENT% , @l ...
- ES6学习笔记(对象新增方法)
1.Object.is() ES5 比较两个值是否相等,只有两个运算符:相等运算符(==)和严格相等运算符(===).它们都有缺点,前者会自动转换数据类型,后者的NaN不等于自身,以及+0等于-0. ...
- eclipse - -解决复制的文件中文乱码问题
Window->Preferences->Web->JSP Files 面板选择 ISO 10646/Unicode(UTF-8)
- python使用配置文件
通过配置文件将变量暴露给用户修改 标准库模块configparser,从而可在配置文件中使用标准格式. 必须使用[files].[colors]等标题将配置文件分成几部分(section).标题的名称 ...
- BZOJ 2434: [Noi2011]阿狸的打字机 AC自动机+fail树+线段树
Description 阿狸喜欢收藏各种稀奇古怪的东西,最近他淘到一台老式的打字机.打字机上只有28个按键,分别印有26个小写英文字母和'B'.'P'两个字母. 经阿狸研究发现,这个打字机是这样工作的 ...
- UVA 10900 So do you want to be a 2^n-aire?
#include<bits/stdc++.h> #include<stdio.h> #include<iostream> #include<cmath> ...
- TTTTTTTTTTTT Codeforces Round #353 (Div. 2) D 平衡二叉树的set模拟 没有很懂
题意:给你n个数字,第一个点作为根节点,然后每次插入一个节点,构建一棵平衡二叉树,并输出插入节点后该节点的父节点的值 #include <iostream> #include <cs ...
- 深入理解Vuex 模块化(module)
todo https://www.jb51.net/article/124618.htm
- Mysql 里CHAR和VARCHAR的最大长度及一些注意事项
先写出结论: Mysql 5中 非空CHAR的最大总长度是255[字节]:非空VARCHAR的最大总长度是65533[字节]. 可空CHAR的最大总长度是254[字节]:可空VARCHAR的最大总长度 ...
- microsoft office 2010 visio激活
office2010 tookit这款绿色的软件进行Visio2010激活 http://jingyan.baidu.com/article/4f34706ecae169e387b56dd1.html