大佬教程收集整理的这篇文章主要介绍了angularjs – Angular js双向数据绑定问题,用于管理“文本框”到“标签”的更改,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
http://jsfiddle.net/dilipkumar2k6/zEdY8/2/`\”\u0026gt;JSfiddleLink
<div ng-app="" ng-controller="controller" id="contentsDivID"> <div ng-repeat="chapter in chapters"> <ng:switch on="chapter.edit"> <div ng:switch-when="true"> <input type="text" ng-model="chapter.title" ng-model="chapter.title" /> <a ng-click="addChapter($indeX);"><i class="icon-ok"></i></a> </div> <div ng:switch-when="undefined"> <label>{{Chapter.titlE}}</label> </div> </ng:switch> </div> </div>
function controller($scopE) { $scope.chapters=[ { "_id": "567456746","title": "Growth and Development","type": "section","edit":true },{ "_id": "34563465345","title": "Links between Areas of Development","type": "section" },{ "_id": "8776545645","title": "characteristics of Development","thumbnail": "/xopus/images/templates/media-1-top-right.png","type": "section" } ]; $scope.addChapter = function(indeX) { $scope.chapters[index].edit = undefined; } }
你可能想要结账angular concepts documentation – 它应该给你一些关于角轨道如何改变模型的重点.
以上是大佬教程为你收集整理的angularjs – Angular js双向数据绑定问题,用于管理“文本框”到“标签”的更改全部内容,希望文章能够帮你解决angularjs – Angular js双向数据绑定问题,用于管理“文本框”到“标签”的更改所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。