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 ...
随机推荐
- 1011 World Cup Betting (20)(20 point(s))
problem With the 2010 FIFA World Cup running, football fans the world over were becoming increasingl ...
- 深入理解ajax系列第八篇
前面的话 在以前,网站的用户与后端交互的主要方式是通过HTML表单的使用.表单的引入在1993年,由于其简单性和易用性,直到电子商务出现之前一直保持着重要位置.理解表单提交,对于更深入地理解ajax是 ...
- linux驱动之一语点破天机
<const 关键字> 在嵌入式系开发中,const关键字就是“只读”的意思 <为什么要ARM需要进行C语言环境的初始化> 在汇编情况下,指令的跳转,保护现场需要保存的数据 ...
- 【二分】【预处理】zoj4029 Now Loading!!!
题意:给定一个序列,多次询问 将a数组从小到大排序,下面那个值只有不超过32种,于是预处理f[i][j],表示分母为i时,aj/i的前缀和是多少. 然后对于一个给定的p,一定将分母划分成了一些连续的段 ...
- 【提权思路】绕过SecureRDP限制远程连接
工具可以在百度上下载 直接步入正题 配置好的SecureRDP是限制远程登录的用户 原理是判断来访的计算机名是否在白名单中 如果不在,便出现如上图所示 网上也有绕过方法(https://weibo.c ...
- CentOS---网络配置详解
一.配置文件详解 在RHEL或者CentOS等Redhat系的Linux系统里,跟网络有关的主要设置文件如下: /etc/host.conf 配置域名服务客户端的控制文件 /etc/h ...
- hdu 5316 Magician(2015多校第三场第1题)线段树单点更新+区间合并
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5316 题意:给你n个点,m个操作,每次操作有3个整数t,a,b,t表示操作类型,当t=1时讲a点的值改 ...
- hdoj 5122 K.Bro Sorting 贪心
K.Bro Sorting Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others) Tot ...
- poj 3041 Asteroids 最小点覆盖/最大匹配
Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16242 Accepted: 8833 Descriptio ...
- IIS Express并发数设置
今天将之前的一个瓦片图的服务迁移到了asp.net core试了一下,使用的时候感觉客户端刷新时有些慢,估计是并发连接数限制的原因. 由于这是一个开发中的版本,是用IIS Express部署的,IIS ...