Registering a service using factory api of angular module.