Answer the question
In order to leave comments, you need to log in
How to solve a wretched error, with getting an object?
Hello everyone, this is some kind of tin.
With $resource:
'create': {
method: 'POST'
}
//...
//запрос к модуле, выполнения запроса, вызов return $this->db->getLastId(); (возвращает уникальный идентификатор, только что созданный)
// отправляем назад
$this->response->setOutput(json_encode($data));
SettingProject.create({}, data).$promise
.then(function(data) {
console.log('получаем: '+data); // получаем: [object Object]
console.log(angular.fromJson(data)); // e {0: "3", 1: "0", $promise: d, $resolved: true}
console.log(JSON.stringify(data)); // {"0":"3","1":"0"}
}, function(error) {
console.log(error);
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question