弹来弹去跑马灯!

hello angular JS

 

hello angular JS

 

 

<html ng-app="myApp">
<head>
    <title> hello angular</title>
    <script src="Scripts/angular.js"></script>

</head>
<body>
    <div ng-controller="testCtrl">

        <ul>
            <li ng-repeat="phone in phones">
                {{phone.name}}
                <p>{{phone.snippet}}</p>
            </li>
         
        </ul>
    </div>
    <script>

        var myApp = angular.module('myApp', []);

        myApp.controller('testCtrl', ['$scope', function ($scope) {

            $scope.phones = [
                      {
                          "name": "Nexus S",
                          "snippet": "Fast just got faster with Nexus S."
                      },
                      {
                          "name": "Motorola XOOM™ with Wi-Fi",
                          "snippet": "The Next, Next Generation tablet."
                      },
                      {
                          "name": "MOTOROLA XOOM™",
                          "snippet": "The Next, Next Generation tablet."
                      }
            ];

        }]);


    </script>
</body>
</html>

  

怎么样快速入门AngularJS?

http://www.ngnice.com/posts/205af1ea1e13d2  

 

posted @ 2015-07-29 11:00  wgscd  阅读(118)  评论(0)    收藏  举报