Angular 4多个提供者

Angular 4多个提供者,angular,service-provider,Angular,Service Provider,在我的模块中,我想插入多个提供者。但在添加APP_初始值设定项服务时,我丢失了窗口提供程序= providers: [ AlertService, ConfigurationService, LocalStoreManager, EndpointFactory, BaseComponent, BaseService

在我的模块中,我想插入多个提供者。但在添加APP_初始值设定项服务时,我丢失了窗口提供程序=

providers: [
        AlertService,       
        ConfigurationService,
        LocalStoreManager,                 
        EndpointFactory,        
        BaseComponent,            
        BaseService,
        { provide: APP_INITIALIZER, useFactory: app_Init, deps:[BaseService], useClass:BaseService, multi:true },
        { provide: 'Window', useValue: window, useClass:window, multi:true }       
    ],
有办法做到这一点吗

…以便我的组件可以加载其窗口位置=

@Component({
    selector: 'management-root',
    templateUrl: window["baseUrl"] + '/src/app/components/site/management.html'    
})

什么意思,你丢失了窗口提供程序?当页面加载时,它首先解析APP_INITILIZER并返回数据。然后,当它通过窗口[“baseurl”]获取templateUrl时,什么也不会发生。我没有收到任何错误,但没有加载任何内容。从提供程序中删除APP_初始值设定项行可使应用程序正确加载。我刚刚从APP_初始值设定项提供程序中删除了这一行=multi:true这会导致以下错误=“混合多个和非多个提供程序对于令牌是不可能的”我现在认为这与混合应用程序初始化器的多提供者和单一窗口有关。。。但这对我没有帮助。我需要在模块中提供这两者,以便它们能够在构造函数之前在@Component部分中使用。。。