"AngularJS 튜토리얼 - Hello 예제 2"의 두 판 사이의 차이

3번째 줄: 3번째 줄:
*ng-init을 통해 yourName 변수에 값을 할당함
*ng-init을 통해 yourName 변수에 값을 할당함
*<code><nowiki>{{yourName}}</nowiki></code> 자리에 변수의 값을 보여줌
*<code><nowiki>{{yourName}}</nowiki></code> 자리에 변수의 값을 보여줌
;AngularJS가 가진 템플릿 엔진 기능
:AngularJS의 템플릿 엔진 기능


==hello2.html==
==hello2.html==

2015년 6월 20일 (토) 17:14 판

1 개요

AngularJS 튜토리얼 - Hello 예제 2
  • ng-init을 통해 yourName 변수에 값을 할당함
  • {{yourName}} 자리에 변수의 값을 보여줌
AngularJS의 템플릿 엔진 기능

2 hello2.html

<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script>
</head>
<body ng-app ng-init="yourName='친구들'">

<h1>안녕 {{yourName}}!</h1>

</body>
</html>

3 테스트

4 같이 보기

5 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}