模型更改时不调用 ngModel.$render [英] ngModel.$render is not called when model change

查看:27
本文介绍了模型更改时不调用 ngModel.$render的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 tiny-mce 与 angular 结合使用,但是指令中的 $render 函数遇到了一些问题.当我更新模型时,不会调用 $render 函数.

I'm trying to use tiny-mce with angular, but i have some trouble with the $render function in the directive. When i update the model, the $render function is not call.

这里有一个 plunkr 来说明:http://plnkr.co/edit/Ih1nDq?p=预览

Here a plunkr to illustrate: http://plnkr.co/edit/Ih1nDq?p=preview

我不确定,但我认为这可能与 angular 1.2 有关,因为对于 angular 1.1.5,有用 :http://plnkr.co/edit/LXAtHd?p=preview

I'm not sure, but i think it could be related to angular 1.2, because with angular 1.1.5, it works : http://plnkr.co/edit/LXAtHd?p=preview

这是 angular 1.2 的错误,还是我错过了 angular 1.2 的一些新东西?

Is this a bug of angular 1.2, or did i miss something new with angular 1.2?

推荐答案

这个答案显示了您在指令中需要的代码,以便在必要时关闭渲染:

This answer shows code you need in your directive to make render fire off when necessary:

TinyMCE