I have an Angular service that either should return an existing object or call a webservice and load some data. To have a consistent client API I want to use a promise in both cases.
It’s not very hard to do this using Angular:
I have an Angular service that either should return an existing object or call a webservice and load some data. To have a consistent client API I want to use a promise in both cases.
It’s not very hard to do this using Angular: