Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Created April 30, 2015 21:48
Show Gist options
  • Save joffilyfe/8e419e99870a2ef3a02e to your computer and use it in GitHub Desktop.
Save joffilyfe/8e419e99870a2ef3a02e to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8">
<title>Olar</title>
</head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.js"></script>
<script>
var app = angular.module(['app'], []);
app.controller('ListaCtrl', function($scope) {
$scope.itens = {
'itens': [
{
"id": 1,
"nome_grupo": "Administradores"
},
{
"id": 5,
"nome_grupo": "Diretoria"
},
{
"id": 2,
"nome_grupo": "Financeiro"
},
{
"id": 4,
"nome_grupo": "Suporte"
},
{
"id": 6,
"nome_grupo": "teste de funcionalidade"
}
]
};
});
</script>
<body ng-controller="ListaCtrl">
<select>
<option ng-repeat="n in itens['itens']" value="{{n.id}}">{{n.nome_grupo}}</option>
</select>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment