I'M USING ANGULAR 1.6.2 WHIT PHALCON
$scope.selectAction = function(Item){
$http({
method: 'GET',
url: 'Mycontroller/new',
params : {Item : Item},
headers : {'Accept' : 'application/json'}
}).then(function successCallback(res) {
// this callback will be called asynchronously
// when the response is available
console.log("DATOS : "+res.data.res);
$scope.lista_premisos = res.data.res;
}, function errorCallback(data) {
// called asynchronously if an error occurs
// or server returns response with an error status.
console.log(data);
}); }
And when I pick up on my controller it does not return anything
public function newAction()
{
//si es una petición get
if($this->request->isGet() == true)
{
$this->view->disable();
$id = $this->request->getPost("Item");
$this->response->setJsonContent(array('res' => array($id)));
$this->response->setStatusCode(200, "OK");
$this->response->send();
} }
Also had problems with the angular version.
Something I'm doing wrong, help please.