Tuesday, June 23, 2015

A simple AngularJS app


<!DOCTYPE html>
<html lang="en">


<head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
</head>

<body ng-app="simpleapp">


    <div ng-controller="SimpleController">

        <h2>Hello, {{entity.title}}</h2>

    </div>


    <script>
angular.module("simpleapp", [])
    .controller("SimpleController", function($scope) {
        $scope.entity = {};
        $scope.entity.title = "A simple AngularJS app";
    } );
    </script>



</body>

</html>

No comments:

Post a Comment