Page 1 of 1

Mapping service response to components

Posted: Sun Mar 04, 2018 9:40 pm
by Alan Smith

I am trying to map an array from a service response to a list component.

I am building a Ionic app.

When i click on the 'Click to edit mapping' on the service response, there are NO compenents listed, even through there is a list on the interface, and some other components.

Can I map the response like this?

Or what is the correct way to do this?

I do not seem to be able to find any information in the documentation about how to do this?

Please can you advise?


Mapping service response to components

Posted: Mon Mar 05, 2018 2:11 pm
by Serhii Kulibaba

Hello Alan,

Please send us screenshots of this problem so we can better understand what is happening.

It has to work fine, so please try to clear your browser cache. You can learn how to do it here:
https://docs.appery.io/docs/using-bro...
Close your browser and try again. Please let us know if this helped.


Mapping service response to components

Posted: Mon Mar 05, 2018 3:24 pm
by Alan Smith

Hi Serhii

I have cleared cache and also tried in several different browsers, but it does not fix the issue.

Please see screenshots

UI with several components:
Image

Function screen:
Image

Mapping screen:
Image


Mapping service response to components

Posted: Tue Mar 06, 2018 11:03 am
by Serhii Kulibaba

You are right, the mapping works only with scope variables and service request/response parameters in Ionic projects.

If you need to display the service response in the UI component, please save the response value to the scope variable and use it in the component: https://docs.appery.io/docs/appbuilde...

E.g. for the text component it has to be code{{myVariable}}/code