Sto utilizzando un servizio per aggiornare una tabella DB.
myApp.factory('createGal', function ($http, $q)
{
return {
createGal: function()
{
var deferred = $q.defer();
var newGalleryArray = {};
newGalleryArray.galleryName = 'New Image Gallery';
newGalleryArray.client = 245;
$http.post('/beta/images/create', {newGalleryArray: newGalleryArray}).success(function(data)
{
console.log(data);
deferred.resolve(data);
});
return deferred.promise;
}
};
});
PHP
public function create()
{
print_r($_POST);
}
L'array sta tornando vuoto. Sto passando l'array in modo errato?
Chrome Dev
Grazie
Qual è la console che dice della richiesta? – tymeJV
riuscito, richiesta. Restituisce l'azione DB, solo l'array non viene inviato in POST – Bungdaddy
Interessante ... che cosa sta inviando il tuo PHP indietro? – tymeJV