I am using AngularJS for my front-end and Django as a back-end.
I am doing very simple things at the back-end so I have not considered using tastypie.
The proble
You have to define the controller as part of the module. Try the following:
// controller.js
angular.module('app')
.controller('EntryCtrl', [
'$scope',
'$http',
'$routeParams',
'$location',
'master', // this has to be angular injectable
function($scope, $http, $routeParams, $location, master) {
$scope.form = master.form;
}
]);
and you should only define the app once within the app.js
:
// angular.js
angular.module('app', ['ngResource'])
.config([
'$routeProvider',
function($routeProvider){
$routeProvider
.when('/', {
templateUrl: '/templates/workflow/request_form.html',
controller: 'EntryCtrl'
})
.otherwise({
redirectTo: '/'
});
}
]);
Then make sure you include this after you define the angular app within the template: