In my angular application I have a settings module that I made a constant. I figured that it should be a constant because the constants get applied before other provide methods.
I also have 2 services: getUserIdService
and getTokenService
that get me userId
and token
respectively.
angular.module('app').constant('settings', {
streamServer: 'http://someurl.com:9009',
userId: /* $getUserIdService.getUserId() */
token: /* $getTokenService.getToken() */
});
From what I see in the api constant
doesn't have a constructor so I can't pass in any dependencies (getUserIdService
, getTokenService
)
This module needs to be globally available and it doesn't have to be a constant. I just need it to get initialized before any other module.
How can I do this?