Pete Nellmapius
Posts: 0
Joined: Thu Sep 05, 2013 1:24 pm

2 services mapped to component. Toggle between the 2 getting appropriate data shown in component

I have a RestService mapped to an component.
In Javascript I do: service_name1.execute({}); which works fine.
I then want to Close that Service and Execute another one that is also connected to the component.
In JS I do: service_name2.execute({}); but nothing happens.
How do I close the first service before executing the 2nd one or refresh the HTML component?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

2 services mapped to component. Toggle between the 2 getting appropriate data shown in component

Hello! You can't close the service - you invoke it and it's running. Ones you receive the data results are mapped and service events invoked (success|error and complete). If you need to invoke second service you can do that on success or complete event of the first one.

Return to “Issues”