码迷,mamicode.com
首页 > Web开发 > 详细

Angularjs实例5

时间:2016-01-14 17:31:10      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html lang="zh-cn" ng-app="myApp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<div ng-controller="myCtrl">
<h3>Welcome {{hello.title}} to the world!</h3>
</div>
<script>
//angular.module("myApp", []).controller("myCtrl", function ($scope) { $scope.hello= {title:"angular"}; })
angular.module("myApp", []).controller("myCtrl", function ($scope) { $scope.hello = {}; $scope.hello.title = "AngularJS";})
</script>
</body>
</html>

Angularjs实例5

标签:

原文地址:http://www.cnblogs.com/melao2006/p/5130868.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!