mercredi 26 avril 2017

Angular 2 Filtering Checkbox

First of all, I'm very new to web development so my apologies for this (probably) easy question. I've created a django website but I want to decouple the front-end with Angular 2. I've created an API in Django and I can successfully get the data into Angular. Now I want to create a filters with checkboxes.

I have an array like this:

"id": 1, family": "blabla", group": "blabla", some other specific fields related to id1

"id": 2, family": "blabla", group": "blabla", some other specific fields related to id2

Each family or group can have different values so I would like to create checkboxes for them and filter on that. If I select multiple checkboxes, the data would show up, including the specific fields.

I could find examples for Angular1 but not really for Angular 2. Can someone share an example how they have done it?

Many thanks!




Aucun commentaire:

Enregistrer un commentaire