我无法在Angular 2中使用自定义双向数据绑定工具。Docs表明,盒子模型中的香蕉 - [()]只是合成糖,但是在我的例子这样不起作用,而较长方法的工作原理:Angular 2双向数据绑定不起作用
<child-component [(test)]="check">This child updates only itself</child-component>
<child-component [test]="check" (check_send)="check=$event">This child updates all</child-component>
的@Output事件不会改变在一个盒子模型(第一行)在香蕉父值。 作为第二行工作,我没有看到我做错了什么。 下面是该文档的链接:https://angular.io/guide/template-syntax#two-way-binding---
这里是我创造展示此行为的plunker:https://embed.plnkr.co/eTfkQmRfBRxeKCEpGdzh/
编辑:这是一个不同的问题可能重复的,因为这个问题不会产生任何错误,再加上它是一个更简单和局限性的双向绑定格式化问题。
的可能的复制[?Angular2 - 上的部件变量/组件类属性双向数据绑定](https://stackoverflow.com/questions/ 35639650/angular2-two-way-databinding-on-a-component-variable-component-class-propert) – HaveSpacesuit