Angular JS Magazine

luni, 8 septembrie 2014

Simplest Controller Ever

This tip is just an Angular JS skeleton application containing a simple controller:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="../angular/angular.min.js"></script>
    <script>
        angular.module("atpModule", [])
                .controller("atpCtrl", function ($scope) {

                });
    </script>
</head>
<body>
   <div ng-app="atpModule" ng-controller="atpCtrl">
       Angular JS application with simple controller
   </div>
</body>
</html>