AngularJS Data Binding - Data Model(데이터 모델)
AngularJS Data Binding
Data Model(데이터 모델)
AngularJS 어플리케이션은 대개 데이터 모델을 가지고 있습니다. 데이터 모델은 응용 프로그램에서 사용할 수있는 데이터 모음입니다.
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstname = "John";
$scope.lastname = "Doe";
});
HTML보기
AngularJS 응용 프로그램이 표시되는 HTML 컨테이너를보기라고합니다.
뷰에는 모델에 대한 액세스 권한이 있으며 뷰에 모델 데이터를 표시하는 데는 여러 가지 방법이 있습니다.
ng-bind지시어 를 사용하면 요소의 innerHTML을 지정된 모델 속성에 바인딩 할 수 있습니다 .
<p ng-bind="firstname"></p>
소스
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname"></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstname = "John";
$scope.lastname = "Doe";
});
</script>
<p>Use the ng-bind directive to bind the innerHTML of an element to a property in the data model.</p>
</body>
</html>
<p>First name: {{firstname}}</p>
소스
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p>First name: {{firstname}}</p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstname = "John";
$scope.lastname = "Doe";
});
</script>
<p>You can use double braces to display content from the data model.</p>
</body>
</html>
Data Model(데이터 모델)
AngularJS 어플리케이션은 대개 데이터 모델을 가지고 있습니다. 데이터 모델은 응용 프로그램에서 사용할 수있는 데이터 모음입니다.
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstname = "John";
$scope.lastname = "Doe";
});
HTML보기
AngularJS 응용 프로그램이 표시되는 HTML 컨테이너를보기라고합니다.
뷰에는 모델에 대한 액세스 권한이 있으며 뷰에 모델 데이터를 표시하는 데는 여러 가지 방법이 있습니다.
ng-bind지시어 를 사용하면 요소의 innerHTML을 지정된 모델 속성에 바인딩 할 수 있습니다 .
<p ng-bind="firstname"></p>
소스
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind="firstname"></p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstname = "John";
$scope.lastname = "Doe";
});
</script>
<p>Use the ng-bind directive to bind the innerHTML of an element to a property in the data model.</p>
</body>
</html>
<p>First name: {{firstname}}</p>
소스
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p>First name: {{firstname}}</p>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstname = "John";
$scope.lastname = "Doe";
});
</script>
<p>You can use double braces to display content from the data model.</p>
</body>
</html>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 118 | jQuery Mobile | 8년 전 | 1347 | ||
| 117 | jQuery Mobile | 8년 전 | 1596 | ||
| 116 | jQuery Mobile | 8년 전 | 1825 | ||
| 115 | jQuery Mobile | 8년 전 | 1781 | ||
| 114 | jQuery Mobile | 8년 전 | 1970 | ||
| 113 | jQuery Mobile | 8년 전 | 1879 | ||
| 112 | jQuery Mobile | 8년 전 | 2486 | ||
| 111 | jQuery Mobile | 8년 전 | 1794 | ||
| 110 | jQuery Mobile | 8년 전 | 1585 | ||
| 109 | jQuery Mobile | 8년 전 | 1748 | ||
| 108 | jQuery Mobile | 8년 전 | 1970 | ||
| 107 | jQuery Mobile | 8년 전 | 1772 | ||
| 106 | jQuery Mobile | 8년 전 | 1450 | ||
| 105 | jQuery Mobile | 8년 전 | 1748 | ||
| 104 | jQuery Mobile | 8년 전 | 2425 | ||
| 103 | jQuery Mobile | 8년 전 | 1564 | ||
| 102 | jQuery Mobile | 8년 전 | 1505 | ||
| 101 | jQuery Mobile | 8년 전 | 1697 | ||
| 100 | jQuery Mobile | 8년 전 | 1922 | ||
| 99 | jQuery Mobile | 8년 전 | 1375 | ||
| 98 | jQuery Mobile | 8년 전 | 1400 | ||
| 97 | jQuery Mobile | 8년 전 | 1660 | ||
| 96 | jQuery Mobile | 8년 전 | 1311 | ||
| 95 | jQuery Mobile | 8년 전 | 1127 | ||
| 94 | jQuery Mobile | 8년 전 | 1528 | ||
| 93 | jQuery Mobile | 8년 전 | 1149 | ||
| 92 | jQuery Mobile | 8년 전 | 1570 | ||
| 91 | jQuery Mobile | 8년 전 | 1517 | ||
| 90 | jQuery Mobile | 8년 전 | 1683 | ||
| 89 | jQuery Mobile | 8년 전 | 1668 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기