view raw
Boris D. Teoharov Boris D. Teoharov - 11 months ago 85
Javascript Question

use $filter service inside module.config

As per the AngularJS documentation it seems that it is only possible inject providers in

However, I have to configure some 3rd party service using its provider
and set it up like this:

ServiceXProvider.format = function format(x) { return $filter('date')(x, "yyyy-MM-dd"); }

is obviously a service and not a provider and I can not inject it into the

Is there any reasonable workaround for this scenario?


You can update a provider object in a run() block where you can inject services