内部还可以与LT NG-模型; TD>表的元素? [英] is ng-model allowed inside <td> element of a table?

查看:96
本文介绍了内部还可以与LT NG-模型; TD>表的元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时允许一个表里面的元素NG-模式?会自动角更新模型,如果我改变一个特定的列(即视图)?

Is ng-model allowed inside element of a table? Will angular automatically update the model if I change a particular column(i.e. view)?

推荐答案

如果您正在直接编辑使用HTML表格单元格 CONTENTEDITABLE 属性,NG-模式赢得将不起作用自动默认情况下,它只是为表单元素。

If you are making the table cells directly editable using the HTML contenteditable attribute, ng-model won't work automatically as by default it's only for form elements.

有可能使其与 CONTENTEDITABLE 的工作,虽然。有一个在<一的怎么办呢角网站上的工作示例href=\"http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController\">http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController

It is possible to make it work with contenteditable though. There is an working example of how to do it on the angular website at http://docs.angularjs.org/api/ng.directive:ngModel.NgModelController

这篇关于内部还可以与LT NG-模型; TD&GT;表的元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆