Page 1 of 3
Manage attributes in the List Item component
Posted: Wed Aug 24, 2016 6:17 am
by Kurt Spangsbjerg Petersen
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?
Manage attributes in the List Item component
Posted: Wed Aug 24, 2016 12:59 pm
by EJLD
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...
Manage attributes in the List Item component
Posted: Wed Aug 24, 2016 9:35 pm
by Kurt Spangsbjerg Petersen
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.
- Shoud I build a new function?
- 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.
Manage attributes in the List Item component
Posted: Thu Aug 25, 2016 1:02 am
by EJLD
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
Manage attributes in the List Item component
Posted: Thu Aug 25, 2016 2:00 pm
by Kurt Spangsbjerg Petersen
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.
Manage attributes in the List Item component
Posted: Thu Aug 25, 2016 2:05 pm
by EJLD
can you post a screenshot of your response ?
Manage attributes in the List Item component
Posted: Thu Aug 25, 2016 7:04 pm
by Kurt Spangsbjerg Petersen
Manage attributes in the List Item component
Posted: Thu Aug 25, 2016 7:07 pm
by Kurt Spangsbjerg Petersen
Manage attributes in the List Item component
Posted: Thu Aug 25, 2016 11:31 pm
by EJLD
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 ?
Manage attributes in the List Item component
Posted: Sat Aug 27, 2016 7:21 pm
by Kurt Spangsbjerg Petersen
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:
BINDING:
Where do you open the mapping editor to see the components to the right?