What is the best way to do a backround services with ionic?

What is the best way to do a backround services with ionic?