【发布时间】:2017-11-17 03:54:09
【问题描述】:
我从 Angular 开始,但遇到了问题。我有这个div。它包含显示来自角度javascript 的{{stored}} 值的div。当您在文本框中键入内容并单击按钮时。
<div>
<div id="hidestore">{{stored}}</div> <input id="dobind" type="text" />
<input type="button" id="showstore" value="show" />
</div>
它调用这个jquerycode,它添加了textbox一个ng-model,对应于上面的{{stored}}。
基本上我希望 div 从按下按钮的那一刻起显示{{stored}} 值(不使用$scope)。
$("#showstore").click(function() {
$("#dobind").attr("ng-model", "stored")
});
对不起,我的语法不好。我需要帮助!
【问题讨论】:
标签: javascript jquery javascript jquery html css angularjs