1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <!DOCTYPE html> <html ng-app="app"> <head> <meta charset="utf-8"> <title>Angularjs</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.js" charset="utf-8"></script> </head> <body ng-controller="ctrl as vm"> <input type="text" ng-model="vm.title"> <pre ng-bind="vm.title"></pre> <span>{{vm.title}}</span> <script type="text/javascript"> angular.module('app',[]) .controller('ctrl',function($scope){ var vm = this; vm.title = "change the value"; }); </script> </body> </html> | cs |
angularJs two-way binding example
angularJs Verstion : 1.4.9
:: codepen.io
See the Pen angularjs 1.4 two-way binding by homin ahn (@beans9) on CodePen.
'Programming > AngularJS' 카테고리의 다른 글
[AngularJs] 핵심 컴포넌트들 (0) | 2016.06.18 |
---|---|
[angularJs] select ng-option 사용 방법 (0) | 2016.06.13 |
[angular-bootstrap] tooltip custom trigger (0) | 2016.06.01 |
Yeoman를 이용한 gulp-angularjs 기본환경 셋팅 (0) | 2016.05.06 |
[angularjs] focus 지정하기 (0) | 2016.03.11 |