Olá,
Você pode receber seus dados em JSON, via AJAX.
Exemplo:
$.ajax({
type: 'GET',
dataType: "JSON",
url:'dados.html',
success: function(data){
$scope.veiculos = data;
},
error: function(data){
}
});
Assim lá no html, você faz:
<tr ng-repeat="v in veiculos ">
<td>{{v.speed}}</td>
<td>{{p.location}}</td>
<td>{{p.type}}</td>
</tr>
Exemplo: http://fabricioronchi.github.io/AngularJS/
Fabrício Ronchi
www.fabricioronchi.com
Em terça-feira, 18 de fevereiro de 2014 07h33min12s UTC-3, Jake Peteman
escreveu:
>
> I'm new to designing web applications and don't really know where I should
> start in regards to handling a database. I'm building an application which
> will have a lot of different type of objects, do I need to write WebAPI
> controllers for each and every one of them? Like for example if I have a
> Vehicle class, is there any way to just bind the whole database to Angular
> and then list all the Vehicles from there instead of implementing
> controllers for each and every one of my type of objects? Ideally I'd like
> to write something like
>
> <tr data-ng-repeat="v in vm.Vehicles">
> <td>{{v.speed}}</td>
> <td>{{p.location}}</td>
> <td>{{p.type}}</td>
> </tr>
>
> and not have to worry about setting up a controller for every new object I
> add, and just query the Entity class names and variable names instead.
>
> Any help is appreciated!
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.