I'm getting use to AngularJS ng-resource but I am having a problem serieliazing an array. My ng-resource is like this
app.factory('MyModel', ['$resource', 'api_domain',
function($resource, api_domain) {
return $resource(api_domain + 'adsizes/:id', {
id : '@id'
}, {
get : {method: 'GET', isArray: true }
})
}]);
And my controller looks like this:
app.controller("MyCtrl", ['$scope', 'MyModel',
function($scope, MyModel) {
MyModel.get({
id : id,
'conditions': { 'join' : 'table2'}
}, function() {
});
});
The problem is it passes the conditions like so:
conditions:{"join":"table2"}
Which passes into php as a string that has to get decoded. My question is how can I pass the conditions as associative array for php?