-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdataBinding.html
More file actions
37 lines (32 loc) · 1.01 KB
/
Copy pathdataBinding.html
File metadata and controls
37 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<html ng-app="myApp">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js">
</script>
<body ng-controller="TextController">
<p>{{someText.message}}</p>
<script>
var myAppModule = angular.module('myApp', []);
myAppModule.controller('TextController',
function TextController($scope) {
var someText = {};
someText.message = '지금 여러분의 여정은 시작됐습니다.';
$scope.someText = someText;
});
</script>
<form ng-controller = 'StartupController'>
창업 예산 : <input ng-change = 'computeNeeded()'
ng-model = 'funding.startingEstimate'>
권장 자본금 : {{funding.needed}}
</form>
<script>
function StartupController($scope) {
$scope.funding = {
startingEstimate : 0
};
$scope.computeNeeded = function () {
$scope.funding.needed = $scope.funding.startingEstimate * 10;
};
}
</script>
</body>
</html>