#1 2016-03-27 22:19:47

impulsmedia
Member
Registered: 2015-04-21
Posts: 64

error with double keys in Select.control > ngRepeat:dupes

Hello again,

a second problem I have to solve: I try to realize a list of names ( read out of mySQL table) in a MultiSelect.control  where the user can select a certain name. This works fine with a php script which gives the array of names by httpexecute GET to my script. BUT a error alwas ocurrs in the moment, when I have 2 or more same names in the list (i.e. Hiller,Hiller). Then I get an compiler error which shows to an error ngRepeat:dupes. I found a website with some information but don´t know you to treat it ...

https://docs.angularjs.org/error/ngRepeat/dupes


Thanks,
Walter

Offline

#2 2016-03-27 23:32:21

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: error with double keys in Select.control > ngRepeat:dupes

Hello Walter,

I want to take a look at this, but, currently duplicates are not supported, then if a duplicate items appear the right error is raised. What you can do (I think is possible, since duplicates items are... equals...) is to creates another Array without the duplicates items (using "ArrayIndexOf") you can know if an item is already in this second Array, and then assign that Array to the control Array variable.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.