w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

How to pass a parameter to the success callback function of a service?

I would want to be able to pass a parameter to the myService.execute({}) method, that I can use in the success event. Is this possible?

That way I would have access to the 'data' response in the success event, plus my own parameter.

I cannot use a localStorage variable to pass a parameter, because the parameter is unique for each service call, and multiple service calls are being made one after the other. So if I use a localStorage variable, it is overwritten too fast by the subsequent asynchronous myService.execute calls.

w
Posts: 0
Joined: Tue Mar 26, 2013 12:30 pm

How to pass a parameter to the success callback function of a service?

So I want to override the default success callback function from the service.execute method and give it an extra parameter.(now it has default 1 parameter 'data' )

Return to “Issues”