How can I not wait for a method?


#1

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?


#2

You can use Observables:
https://angular.io/guide/observables

You can also use Promises, but the recommended is Observables instead.