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


Walter Hiller

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


DecSoft

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.


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.