1
|
angular.js 引入angular.js文件
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<!DOCTYPE html>
<html>
<head lang=
"en"
>
<meta charset=
"UTF-8"
>
<script src=
"angular.js"
></script>
<title></title>
</head>
<body>
<div ng-app=
"myApp"
>
<div ng-controller=
"firstController"
>
{{firstName}}
{{lastName}}
</div>
</div>
<script type=
"text/javascript"
>
var
app = angular.module(
"myApp"
,[]);
app.controller(
'firstController'
,
function
($scope){
$scope.firstName=
"张三"
;
$scope.lastName=
"李四"
;
})
</script>
</body>
</html>
|
本文转自Work Hard Work Smart博客园博客,原文链接:http://www.cnblogs.com/linlf03/p/7077594.html,如需转载请自行联系原作者