title: Unable to fix Django-Angular crud function
body: <p>I am trying to implement the crud functionality in django-angular<br>
  This is the Task model:</p>
  
  <pre><code>class Task(models.Model):
      task_name = models.CharField(max_length=50)
      client_name = models.ForeignKey(Client)
      status = models.BooleanField(default=False)
      date = models.DateField('date added', auto_now_add=True)
  
      def __unicode__(self):
          return self.task_name
  </code></pre>
  
  <p>This is the view I added:  </p>
  
  <pre><code>class MyCRUDView(NgCRUDView):
      model_class = Task
  </code></pre>
  
  <p>This is the html file:</p>
  
  <pre><code>&lt;div class="container" ng-app="myApp"&gt;
  &lt;div ng-controller="myCtrl"&gt;
  &lt;table class="table"&gt;
  {% verbatim %}
      &lt;tr ng-repeat="task in tasks"&gt;
          &lt;td&gt;{{ task.pk }}&lt;/td&gt;
          &lt;td&gt;{{ task.task_name }}&lt;/td&gt;
          &lt;td&gt;{{ task.client_name }}&lt;/td&gt;
          &lt;td&gt;{{ task.date }}&lt;/td&gt;
          &lt;td&gt;&lt;input type="checkbox" ng-model="task.status"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  {% endverbatim %}
  &lt;/table&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is the js file for Angular:</p>
  
  <pre><code>var myServices = angular.module('myServices', ['ngResource']);
  
  myServices.factory('Task', ['$resource', function ($resource) {
      return $resource('crud/task', {'pk': '@pk'},{})
  }]);
  
  var my_app = angular.module('myApp', [/* other dependencies */,'ngCookies']).run(function($http, $cookies) {
          $http.defaults.headers.post['X-CSRFToken'] = $cookies.csrftoken;
          //Add the following two lines
          $http.defaults.xsrfCookieName = 'csrftoken';
          $http.defaults.xsrfHeaderName = 'X-CSRFToken';
      });
  
  my_app.controller('myCtrl', ['$scope','Task', function ($scope, Task) {
      //Query returns an array of objects, Task.objects.all() by default
      $scope.models = Task.query();
  
  
  }]);
  </code></pre>
  
  <p>The Angular script keeps giving me an error saying TaskProvider is not recognised. For the life of me I cannot understand where I am doing wrong. The code is almost a copy of the example code in the documentation for django-angular given here<br>
  <a href="http://django-angular.readthedocs.org/en/latest/basic-crud-operations.html" rel="nofollow">http://django-angular.readthedocs.org/en/latest/basic-crud-operations.html</a></p>