day65—angularJS的学习笔记1

 转行学开发,代码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>

posted @ 2018-05-20 20:59  东易韦  阅读(174)  评论(0编辑  收藏  举报