Update service.js

Using events instead.