aaaristo / dyngodb

An experiment to get a MongoDB like interface in front of DynamoDB
Apache License 2.0
69 stars 5 forks source link

Angular.js compatibility #7

Closed aaaristo closed 10 years ago

aaaristo commented 10 years ago

move from "$" to "_" prefixes for hidden attributes

workaround in angular:

1) configure put and post methods to send 'application/json' header even on strings:

  angular.module('myapp',[]).config(['$httpProvider',function ($httpProvider) {
        $httpProvider.defaults.headers.put['Content-Type']='application/json';
        $httpProvider.defaults.headers.post['Content-Type']='application/json';
   }])

2) use JSON.stringify on posts

  $http
  ({
           url: '/my/api/path'
           method: 'POST',
           data: JSON.stringify(myobj)
   })
aaaristo commented 10 years ago

we could use https://github.com/jsog/jsog

aaaristo commented 10 years ago

https://github.com/aaaristo/dyngodb/tree/underscore

aaaristo commented 10 years ago

this should be fixed as for dyngodb2