title: Django-Angular CRUD operations
body: <p>I am using a custom library called <a href="https://github.com/jrief/django-angular" rel="nofollow noreferrer">Django-Angular</a> to perform basic CRUD operations in my Django template.</p>
  
  <p>I am following the <a href="http://django-angular.readthedocs.org/en/latest/basic-crud-operations.html" rel="nofollow noreferrer">official documentation</a>, but am unable to query for Django objects using Angular JS in my template - it is simply just displaying the Angular JS template tag {{ property.name }} and I am receiving an Angular JS <code>Uncaught object</code> error, which points to angular.js file (<a href="http://pastebin.com/KRznZ4Zm" rel="nofollow noreferrer">this is the code block that it points to</a>, it points to the 1st line).</p>
  
  <p>According to <a href="https://stackoverflow.com/questions/24292121/angularjs-minerror-uncaught-object">this answer</a>, the module is not injected properly, thats where I need some help.</p>
  
  <p>When following the tutorial I have set up a Django view:</p>
  
  <p><code>class PropertyMapView(NgCRUDView):
      model = Property
      fields = ['name',]</code></p>
  
  <p>added an URLparameter:</p>
  
  <p><code>url(r'^crud/property/?$', PropertyMapView.as_view(), name='property_map_view'),
  </code>
  And this is my template:</p>
  
  <pre><code>  &lt;body ng-app="myServices"&gt;
  
      {% verbatim %}
  
      &lt;script type="text/javascript"&gt;
  
  
      var myServices = angular.module('myServices', ['ngResource']);
  
      myServices.factory('Property', ['$resource', function($resource) {
          return $resource('/crud/property/', {'pk': '@pk'}, {
          });
      }]);
  
  
  
      myServices.controller('myCtrl', ['$scope', 'Property', function ($scope, Property) {
      // Query returns an array of objects, MyModel.objects.all() by default
      $scope.models = Property.query();
  
      // Getting a single object
      var property = Property.get({pk: 1});
  
      }]);
  
      &lt;/script&gt;
  
      &lt;div ng-controller="myCtrl" &gt;
          &lt;h2&gt;Test: {{ property.name }} &lt;/h2&gt;
          or
          &lt;h2&gt;Test: {{ property }} &lt;/h2&gt;
      &lt;/div&gt;
  
      {% endverbatim %}
  </code></pre>
  
  <p>By the way, I think that the view itself works, because when I am querying for <code>http://myurl.com/crud/property/</code>, I am receiving some data in the browser:</p>
  
  <p><code>[{"pk":1,"name":"Pastatas A"},{"pk":4,"name":"hmgbjmnbm"},{"pk":3,"name":"gfghfghfg"},{"pk":5,"name":"sdfsdgsdgsdgasssss"}]</code>.</p>
  
  <p>I am just unable to set up the javascript part and make it work - as I said, it is simply just displaying the Angular JS template tag {{ property.name }} and I am receiving an Angular JS <code>Uncaught object</code> error. </p>