Answer the question
In order to leave comments, you need to log in
How to get json in scope?
Hello! Please help. I want to build a select
Using $http.get , I get the following JSON:
{ value: "0", name: "Pendiente" },
{ value: "1", name: "Em andamento" },
{ value: "2", name: "Erro" },
{ value: "3", name: "Enviar email" },
{ value: "4", name: "Enviado" }
$scope.xxx = angular.fromJson(response);
<select ng-model="bazis" ng-options="bazis as bazis.name for bazis in xxx"></select>
<select ng-model="bazis" ng-options="bazis as bazis.name for bazis in xxx">
<option value="string:[" label="undefined" selected="selected"></option>
<option value="string:{" label="undefined"></option>
<option value="string:"" label="undefined"></option>
<option value="string:v" label="undefined">
...
</select>
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