Kurt Spangsbjerg Petersen
Posts: 0
Joined: Wed Aug 17, 2016 8:51 pm

Manage attributes in the List Item component

Hi
I'm using the List Item component with Icon Left, Icon Right and Item Badge.
I need to control the visibility for the icons.
The ng-show and ng-hide works only for the entire item, not just for a single icon in the item list.
Any ideas how to manage this?

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Manage attributes in the List Item component

hi there, i replied for sth similar. don t be afraid if it says it doesn t work. if you follow the code logic in mapping it must work. i use it a lot.

https://c.getsatisfaction.com/apperyi...

Kurt Spangsbjerg Petersen
Posts: 0
Joined: Wed Aug 17, 2016 8:51 pm

Manage attributes in the List Item component

Thanks, EJLD
I understand the mapping but I don't know where exactly to put the code.
I just have an init function that reads the DB and fills the data into an array. That's all.
And the ListItem repeating these values.

  1. Shoud I build a new function?
  2. And I can't refer to the component name. The component name "Left Icon" is not allowed in the code. But it is actually the Left Icon Color I need to change.
    Thanks.
EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Manage attributes in the List Item component

1/ the response from the DB will bring arrays
2/ from the response mapping, link the field's value (left) to your component (right)
3/ inside this component mapping, insert the code I give referring to your component (button) as "element"
4/ the idea is that each entering data from DB field to the component will be read and depending on the each value, each button (the element) of the list will behave differently.
Eric

Kurt Spangsbjerg Petersen
Posts: 0
Joined: Wed Aug 17, 2016 8:51 pm

Manage attributes in the List Item component

Thanks, Eric. It is clear to me what do be done. It is my knowledge about the component editor that lacks. The mapping shows the service response on the left side but not the components to the right. The right side just shows the scope variables.

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Manage attributes in the List Item component

can you post a screenshot of your response ?

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

Manage attributes in the List Item component

Hi Kurt, I cldn't reply quicker due to time diff. it's morning here now.
anyway, understand your difficulty. on right side you shall hv the UI components. how do you populate the values from the right side array to your item list then ? and what the purpose of going through this array, why don't you link left side fields to components directly ?

Kurt Spangsbjerg Petersen
Posts: 0
Joined: Wed Aug 17, 2016 8:51 pm

Manage attributes in the List Item component

Hi Eric
Thanks for trying to help me out. I do not understand how to get the components shown on the right side.
Actually I started all over again (building this sample app https://blog.appery.io/2015/08/buildi...)
From where should I open the Mapping Editor?
From the actual page I can press the "Scope" and "Binding" tab. The results are here:
SCOPE:
Image
BINDING:
Image
Where do you open the mapping editor to see the components to the right?

Return to “Issues”