Angular directives: ng-repeat - Forum

Forum Navigation
You need to log in to create posts and topics.

Angular directives: ng-repeat

VisualNEO Web can use any AngularJS directive. Probably the most useful is ng-repeat.
It allows to display JSON data collections in a very easy way. Plase take a look at the attached sample.

Uploaded files:
  • You need to login to have access to uploads.
Vadim, asmat and YASIN have reacted to this post.
VadimasmatYASIN

@luishp

This is a real hidden gem.

I believe you had informed us about it on this forum months ago; but I had forgotten. I wonder if this could be made easier by ...

- by defining the object to be repeated (template), as a separate Container/Dialog (with html or other inner objects)
- and somehow (perhaps via a neoCommand) linking the outer Container, the inner/template Container, and the array of json objects

This kind of extended facility would make it very easy/efficient to show lists of composite objects (popularly deployed in smartphone Apps in Portrait Mode).

Hola Luis;

Excelente ejemplo. Se podría realizar sin crear el array en el momento, sino traerlo desde afuera?. Estoy experimentando con Json traído desde Wordpress y si bien funciona bastante aceptable y los datos se acceden perfectamente, este hecho de insertar un elemento dentro de un objeto container a través de un Loop que contenga por ejemplo: "Nombre del post y autor" se hace excesivamente lento.

Gracias por los descubrimientos!

Si @palamar ¡claro! Esa es la idea: puedes traer el Array JSON desde una base de datos o desde Google Sheets o desde una consulta a una API de cualquier servicio externo.

Open chat
1
Do you need more info?
Hi, do you have any doubt?