标签:
<!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>
标签:
原文地址:http://www.cnblogs.com/melao2006/p/5130868.html