There is a factory
:
'use strict'; var coreModule = angular.module('core.vkApi', []); coreModule.factory('VkFactory', ['$window', $window => angular.isDefined($window.VK) ? $window.VK : null]);
And provider
:
'use strict'; var coreModule = angular.module('core.vkApi', []); coreModule.provider('VkApi', function VkApiProvider() { var settings = {}; this.setSettings = function(vkSettings) { settings = vkSettings; }; this.$get = ['VkFactory', function(VkFactory) { ... }]; });
When I try to use VkApiProvider, I get this:
Unknown provider: VkFactoryProvider <- VkFactory <- VkApi <- SocialNetworksManagerService <- VkApi
The question is - what is VkFactoryProvider? I don't have such a provider, I don't use it anywhere. How to force angular to use factory without trying to contact the provider?