Angular: CouchDBResource

Not working yet http://angularjs.org/

by Warwick Grigg

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">
<script src="http://code.angularjs.org/1.0.6/angular-resource.min.js"></script>
<div ng-controller="MyCtrl">
  Hello, {{name}}!
  Animals, {{animals|json}}
</div>

JavaScript

var myApp = angular.module('myApp',['ngResource']);

//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});

function MyCtrl($scope) {
    $scope.name = 'Superhero';
    $scope.animals = {animal:'cougar'};
    //$scope.animals = Animals.query();
    //$scope.Products = Project.query();
}

var Animals = $resource('https://telanova.cloudant.com/animaldb/_all_docs');
var animals = Animals.get({userId:123}, function() {
  user.abc = true;
  user.$save();
});


//angular.module('couchdb', ['ngResource']).
 //   factory('Animals', function($resource) {
//      var Amimals = $resource(
//          'https://telanova.cloudant.com/animaldb/_all_docs'
//      );

//      return Animals;
 //   };