angular6 Can't bind to 'zzst' since it isn't a known property of
文档: https://angular.io/guide/template-syntax#event-binding

The Angular compiler may reject these bindings with errors like this one:
content_copyUncaught Error: Template parse errors:
Can't bind to 'hero' since it isn't a known property of 'app-hero-detail'
You know that HeroDetailComponent has hero and deleteRequest properties. But the Angular compiler refuses to recognize them.
The Angular compiler won't bind to properties of a different component unless they are Input or Output properties.
There's a good reason for this rule.
It's OK for a component to bind to its own properties. The component author is in complete control of those bindings.
But other components shouldn't have that kind of unrestricted access. You'd have a hard time supporting your component if anyone could bind to any of its properties. Outside components should only be able to bind to the component's public binding API.
Angular asks you to be explicit about that API. It's up to you to decide which properties are available for binding by external components.
TypeScript public doesn't matterlink
You can't use the TypeScript public and private access modifiers to shape the component's public binding API.
All data bound properties must be TypeScript public properties. Angular never binds to a TypeScript privateproperty.


Angular requires some other way to identify properties that outside components are allowed to bind to. That other way is the @Input() and @Output() decorators.
angular6 Can't bind to 'zzst' since it isn't a known property of的更多相关文章
- Angular4 - Can't bind to 'ngModel' since it isn't a known property of 'input'.
用[(ngModel)]="xxx"双向绑定,如:控制台报错:Can't bind to 'ngModel' since it isn't a known property of ...
- Angular 报错 Can't bind to 'formGroup' since it isn't a known property of 'form'
错误描述 当form表单加FormGroup属性时报错 Can't bind to 'formGroup' since it isn't a known property of 'form' < ...
- Angular: Can't bind to 'ngModel' since it isn't a known property of 'input'问题解决
https://blog.csdn.net/h363659487/article/details/78619225 最初使用 [(ngModel)] 做双向绑定时,如果遇见Angular: Can't ...
- Angular - Can't bind to 'ngModel' since it isn't a known property of 'input'.
用[(ngModel)]="xxx"双向绑定,如:控制台报错:Can't bind to 'ngModel' since it isn't a known property of ...
- Can't bind to 'ngModel' since it isn't a known property of 'input'.
angular项目启动报错 Can't bind to 'ngModel' since it isn't a known property of 'input'. 原因:当前module模块未引入 ' ...
- 在懒加载的Ionic工程中使用 ionic2-auto-complete 组件:Can't bind to 'dataProvider' since it isn't a known property of 'ion-auto-complete'
问题描述: 在基于懒加载的Ionic工程中,使用ionic2-auto-complete组件(GitHub地址:https://github.com/kadoshms/ionic2-autocompl ...
- Can't bind to 'formGroup' since it isn't a known property of 'form'
在APP.module.ts中引入FormsModule, ReactiveFormsModule. import { BrowserModule } from '@angular/platform- ...
- ANGULAR6.x - 错误随笔 - Can't bind to 'formGroup'
formGroup:错误 Can't bind to 'formGroup' since it isn't a known property of 'form'. (" 原因: 在使用for ...
- How to bind to data when the DataContext is not inherited【项目】
http://www.thomaslevesque.com/2011/03/21/wpf-how-to-bind-to-data-when-the-datacontext-is-not-inherit ...
随机推荐
- 1036 Boys vs Girls (25)(25 point(s))
problem This time you are asked to tell the difference between the lowest grade of all the male stud ...
- Python2字符编码问题汇总
目录 从字符编码说起 unicode与utf-8 当编解码遇上Python2.x unicode 与 str 区别 __str__ __repr__的区别 unicode str utf-8关系 un ...
- django定时任务
1.celery流程图: Celery的架构由三部分组成,消息中间件(message broker),任务执行单元(worker)和任务执行结果存储(task result store)组成 2.使用 ...
- 错误:SSL peer shut down incorrectly
韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha 打开这个界面 ,修改一下.对照自己以前的没问题的项目.我的是3.3. 错误:Failed ...
- Struts2 (下)
接收参数 当发送一个请求时,除了使用RequestApi来接收参数之外,Struts2内部提供了3种接收参数的方式 接收参数的方式 1. 提供属性set方法的方式 在Action当中提供对应属性的se ...
- [Arc079F] Namori Grundy
[Arc079F] Namori Grundy 题目大意: 一个有向弱联通环套树. 一个点的sg值等于出边连向点的sg值的mex. 试问是否有办法给每个点分配sg值? 试题分析 题目大意把一些难点跳过 ...
- [xsy3466]见面会
题意:有$n$个区间,把它们划分成若干段,如果一段$k$个区间的交长度$\geq2$,那么会产生$\binom k2$的贡献,最大化贡献 对每个$i$用单调栈预处理出$l_i$表示最小的$j$使得$j ...
- [CodeChef-QTREE]Queries on tree again!
题目大意: 给定一个环长为奇数的带权基环树,支持以下两种操作: 1.两点间最短路取反: 2.两点间最短路求最大子段和. 思路: 首先找出环,然后对每一个外向树轻重链剖分, 用线段树维护每一个区间的和. ...
- java线程本地变量
ThreadLocal是什么呢?其实ThreadLocal并非是一个线程的本地实现版本,它并不是一个Thread,而是threadlocalvariable(线程局部变量).也许把它命名为Thre ...
- Git_创建版本库
什么是版本库呢?版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史,或 ...