R
R
Roman Rakzin2015-08-02 11:36:05
Angular
Roman Rakzin, 2015-08-02 11:36:05

How to display all data from an array except data from another array in Angularjs?

There is an array of students. Students are added to groups.
When adding/removing students, there are 2 tables: students in a group and a general list of students. At the moment, the general list of students is fixed.
I want to do something so that if I add student id-1 to a group, he was not displayed in the general list, because there is no point in adding it again.
How to display all data from an array in Angularjs except data from another array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur, 2015-08-02
Mudrick @mudrick

Angular has nothing to do with it at all.
You have an array of students, each student in the data has an indicator whether the student is added to any group or not added - such as group_id: group ID or null. So filter by this parameter.
Or make two arrays, one for each table, and work with two arrays - delete / add.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question