https://github.com/devinmcinnis/todo-angular
angular.module('myApp', [
'myApp.controllers'
]);
angular.module('myApp.controllers', [])
.controller('TodoController', function($scope){
$scope.title = 'Hello World';
});
<body ng-app='myApp'>
<div ng-controller='TodoController'>
<h1> {{title}} </h1>
</div>
</div>
angular.module('myApp', [ 'ngRoute',
'myApp.controllers' ])
.config(function($routeProvider) { $routeProvider.when('/todo', {
templateUrl: 'partials/todo.html',
controller: 'TodoController'
}); $routeProvider.otherwise({redirectTo: '/todo'}); }]);
https://slid.es/axiomzen/angularjs-primer