refactoring config to angularservice