Avoid AngularJS service
Support immediate function