国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

angular.js - ng-bind does not display data, but ng-model can?
為情所困
為情所困 2017-05-15 16:53:49
0
2
669

The code is as follows

<input type='text' ng-model='cdkey.name'>   {{cdkey.name}}

The input box of ngModel displays the data correctly, but the data is not displayed in the double brackets on the right. What is the reason for this?

Additional: ng-bind can also be displayed correctly, but double curly braces cannot. Is the rendering method of ngBind and double curly braces different? ? ?

為情所困
為情所困

reply all(2)
洪濤

1. If input里面的ng-model綁定的數(shù)據(jù)模型不是一個Object, then this should not happen.
2.ng-bind{{}}The results of rendering data are different when the data model to which they are bound is an object.
3. I wrote a demo, you can have a look.

給我你的懷抱
<input type='text' ng-model='cdkey.name' value="cdkey.name">

The value of the input tag should of course be placed in the attribute valuel.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template