Ionic loading controller - using function to hide and show not settimeout

Folks, I need something like hideloader() and showloader() which should work across the file not with setTimeOut .

Suggest something more of ionic style.

use Promises
or so you need the loader for sth. that has no promises?
Observables should work too, but I didn’t tried them yet