Lets say I have the following flow:
method1()
method2()
But method1 takes long to be executed so I want to “launch” it but not to wait for it to finish to execute method2.
How can I do this?
Lets say I have the following flow:
method1()
method2()
But method1 takes long to be executed so I want to “launch” it but not to wait for it to finish to execute method2.
How can I do this?
You can use Observables:
https://angular.io/guide/observables
You can also use Promises, but the recommended is Observables instead.