0
angular query
app.controller('recipedetails', function($rootScope, $routeParams, $http)
{
$http.get('app/querys/receita_item.php?id='+$routeParams.id).success(function(data) {
$rootScope.recipedetails = data;
console.log(data);
});
});
Arrays receita_item.php
[{"id":"9","id_produto":"1","forma":"Alface","valor":"1.00","id_lanche":"3","qtd_max":"1"}]
[{"id":"41","name":"dd","value":""},{"id":"42","name":"dd","value":""}]
I need these arrays separated
$rootScope.recipedetails_one = data1; // [{"id":"9","id_produto":"1","forma":"Alface","valor":"1.00","id_lanche":"3","qtd_max":"1"}]
$rootScope.recipedetails_two = data2; // [{"id":"41","name":"dd","value":""},{"id":"42","name":"dd","value":""}]
guy my code pulls correct the data but only for 1 array as it has 2 it does not search...
– Willian
face my code pulls the normal data the problem and that has 2 array on the same page.. ai does not answer the date
– Willian
The solution then is to make a list of objects, where you will put your 2 JSON objects. So it will come the 2 in the same object. Got it ?
– vmontanheiro
humm no, in case multi dimensioning this array?
– Willian
I had to post another answer to show you the code. I think your problem is just object organization. Take a look over lists of objects. Thanks
– vmontanheiro