转行学开发,代码100天—2018-05-20
AngularJS的引用示例:
<!DOCTYPE html>
<html>
<head>
<title>angularJS 示例</title>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript">
// var myApp = angular.module('myApp',[]);
// myApp.controller('controller1',function($scope) {
// $scope.helloTo={};
// $scope.helloTo.title = "this is a angularJS";
// });
angular.module('myApp',[]).controller('controller1',function($scope){
$scope.helloTo={};
$scope.helloTo.title = "angularJS";
});
</script>
</head>
<body ng-app="myApp">
<div ng-controller="controller1">welcome to {{helloTo.title}}</div>
</body>
</html>
