<!DOCTYPE html
>
<
html
lang=
"en"
ng-app
>
<
head
>
<
meta
charset=
"UTF-8"
>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<
meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<
title
>Document
</
title
>
<
script
src=
"http://code.angularjs.org/angular-1.0.1.min.js"
type=
"text/javascript"
></
script
>
</
head
>
<
body
>
Your name:
<
input
type=
"text"
ng-model=
"yourname"
placeholder=
"World"
>
<
hr
>
Hellp {{yourname || 'World'}}!
</
body
>
</
html
>
//当加载该页时,标记
ng-app
告诉AngularJS处理整个HTML页并引导应用: