Merge pull request #2572 from mempool/simon/adding-shared-app-module
Adding MempoolSharedModule
This commit is contained in:
commit
2e0afefe63
@ -1,5 +1,5 @@
|
|||||||
import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-browser';
|
import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
@ -20,6 +20,23 @@ import { ShortenStringPipe } from './shared/pipes/shorten-string-pipe/shorten-st
|
|||||||
import { CapAddressPipe } from './shared/pipes/cap-address-pipe/cap-address-pipe';
|
import { CapAddressPipe } from './shared/pipes/cap-address-pipe/cap-address-pipe';
|
||||||
import { AppPreloadingStrategy } from './app.preloading-strategy';
|
import { AppPreloadingStrategy } from './app.preloading-strategy';
|
||||||
|
|
||||||
|
const providers = [
|
||||||
|
ElectrsApiService,
|
||||||
|
StateService,
|
||||||
|
WebsocketService,
|
||||||
|
AudioService,
|
||||||
|
SeoService,
|
||||||
|
OpenGraphService,
|
||||||
|
StorageService,
|
||||||
|
EnterpriseService,
|
||||||
|
LanguageService,
|
||||||
|
ShortenStringPipe,
|
||||||
|
FiatShortenerPipe,
|
||||||
|
CapAddressPipe,
|
||||||
|
AppPreloadingStrategy,
|
||||||
|
{ provide: HTTP_INTERCEPTORS, useClass: HttpCacheInterceptor, multi: true }
|
||||||
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
@ -32,22 +49,17 @@ import { AppPreloadingStrategy } from './app.preloading-strategy';
|
|||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
SharedModule,
|
SharedModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: providers,
|
||||||
ElectrsApiService,
|
|
||||||
StateService,
|
|
||||||
WebsocketService,
|
|
||||||
AudioService,
|
|
||||||
SeoService,
|
|
||||||
OpenGraphService,
|
|
||||||
StorageService,
|
|
||||||
EnterpriseService,
|
|
||||||
LanguageService,
|
|
||||||
ShortenStringPipe,
|
|
||||||
FiatShortenerPipe,
|
|
||||||
CapAddressPipe,
|
|
||||||
AppPreloadingStrategy,
|
|
||||||
{ provide: HTTP_INTERCEPTORS, useClass: HttpCacheInterceptor, multi: true }
|
|
||||||
],
|
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
|
||||||
|
@NgModule({})
|
||||||
|
export class MempoolSharedModule{
|
||||||
|
static forRoot(): ModuleWithProviders<MempoolSharedModule> {
|
||||||
|
return {
|
||||||
|
ngModule: AppModule,
|
||||||
|
providers: providers
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user