@angular/common/http#HttpClientModule TypeScript Examples
The following examples show how to use
@angular/common/http#HttpClientModule.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: app.module.ts From one-platform with MIT License | 6 votes |
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
GraphQLModule,
HttpClientModule,
SharedModule,
BrowserAnimationsModule,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
Example #2
Source File: app.module.ts From 1hop with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
MigrationComponent,
BaseComponent,
NoContentComponent,
ImportComponent,
ManageComponent,
MigrateComponent
],
imports: [
BrowserAnimationsModule,
AppRoutingModule,
NgbAlertModule,
NgbDropdownModule,
FontAwesomeModule,
NgbDropdownModule,
FormsModule,
NgbModule,
HttpClientModule,
LoadingSpinnerModule,
ModalModule.forRoot(),
NgbToastModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: navigator.userAgent.toLowerCase().indexOf('android') === -1 &&
'serviceWorker' in navigator && environment.production
}),
FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #3
Source File: app.module.ts From 1x.ag with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
BaseComponent,
NoContentComponent,
HowItWorksComponent
],
imports: [
BrowserAnimationsModule,
AppRoutingModule,
FormsModule,
NgbModule,
HttpClientModule,
LoadingSpinnerModule,
ModalModule.forRoot(),
DeviceDetectorModule.forRoot(),
NgbToastModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: navigator.userAgent.toLowerCase().indexOf('android') === -1 &&
'serviceWorker' in navigator && environment.production
}),
FontAwesomeModule,
AngularPageVisibilityModule
],
providers: [
{provide: LocationStrategy, useClass: HashLocationStrategy}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #4
Source File: app.module.ts From gnosis.1inch.exchange with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
SlippageSettingsComponent,
GasSettingsComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
BrowserAnimationsModule,
MatButtonModule,
MatSelectModule,
FormsModule,
ReactiveFormsModule,
MatInputModule,
MatFormFieldModule,
MatTooltipModule,
MatIconModule,
MatRadioModule,
NgxWebstorageModule.forRoot(),
MatAutocompleteModule,
NgxMatSelectSearchModule,
MatExpansionModule,
FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #5
Source File: app.module.ts From Angular-Computer-Vision-Azure-Cognitive-Services with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
OcrComponent,
NavMenuComponent,
HomeComponent
],
imports: [
BrowserModule,
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'computer-vision-ocr', component: OcrComponent },
], { relativeLinkResolution: 'legacy' })
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #6
Source File: app.module.ts From transformers-for-lawyers with Apache License 2.0 | 6 votes |
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
DataViewModule,
PanelModule,
MatGridListModule,
ScrollPanelModule,
DialogModule,
DropdownModule,
InputTextModule,
ButtonModule,
HttpClientModule,
FormsModule,
MatCardModule,
MatNativeDateModule,
TabViewModule,
TabMenuModule,
AccordionModule,
BreadcrumbModule,
CardModule,
AppRoutingModule,
ProgressBarModule
],
declarations: [AppComponent, DocumentViewerComponent,
SearchComponent, ReaderComponent,
TaberComponent, SafeHtmlPipe, MenuComponent, FaqComponent, HomeComponent, AboutComponent, ProgressBarComponent],
bootstrap: [AppComponent],
providers: [DocumentViewService, DocumentViewerComponent]
})
export class AppModule { }
Example #7
Source File: app.module.ts From angular-custom-material-paginator with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
PaginatorDirective,
],
imports: [
BrowserModule,
FormsModule,
AppRoutingModule,
MatFormFieldModule,
MatPaginatorModule,
BrowserAnimationsModule,
HttpClientModule,
MatTableModule
],
providers: [],
bootstrap: [AppComponent],
exports: [PaginatorDirective]
})
export class AppModule { }
Example #8
Source File: app.module.ts From DocumentationWebPage with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
HomeComponent,
FooterComponent,
LineComponent,
InformationComponent,
SliderComponent,
DocumentationComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
MatIconModule,
MatCardModule,
MatButtonModule,
MatMenuModule,
MatToolbarModule,
MatTooltipModule,
MatSidenavModule,
MatListModule,
MatTreeModule,
AppRoutingModule,
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
],
entryComponents: [],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #9
Source File: app.module.ts From TypeFast with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
TyperComponent,
TimePipe,
PreferencesComponent,
PopperDirective,
IncorrectWordComponent,
AboutComponent,
],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
MarkdownModule.forRoot({ loader: HttpClient }),
],
providers: [WordService, PreferencesService, ThemeService, LanguageService],
bootstrap: [AppComponent],
})
export class AppModule {
constructor(private themeService: ThemeService) {}
}
Example #10
Source File: app.module.ts From frontend-framework-showdown-2020 with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
ImageSearchComponent
],
imports: [
BrowserModule,
FormsModule,
HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #11
Source File: app.module.ts From Angular-ActionStreams with MIT License | 6 votes |
@NgModule({
imports: [
BrowserModule,
HttpClientModule,
InMemoryWebApiModule.forRoot(ProductData),
AppRoutingModule
],
declarations: [
AppComponent,
WelcomeComponent,
PageNotFoundComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #12
Source File: app.module.ts From ng-devui-admin with MIT License | 6 votes |
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
AppRoutingModule,
CoreModule.forRoot(),
SharedModule.forRoot(),
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useClass: I18NLoader,
},
}),
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
Example #13
Source File: app.module.ts From angular-electron-admin with Apache License 2.0 | 6 votes |
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
CommonModule,
HttpClientModule,
BrowserAnimationsModule,
AppRoutingModule
],
providers: [
{
provide: LocationStrategy,
useClass: HashLocationStrategy
}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #14
Source File: app.module.ts From dbm with Apache License 2.0 | 6 votes |
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
CommonModule,
HttpClientModule,
BrowserAnimationsModule,
AppRoutingModule
],
providers: [
{
provide: LocationStrategy,
useClass: HashLocationStrategy
},
{provide: NZ_CONFIG, useValue: ngZorroConfig}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #15
Source File: about.module.ts From RcloneNg with MIT License | 6 votes |
@NgModule({
declarations: [AboutComponent],
imports: [
CommonModule,
AboutRoutingModule,
HttpClientModule,
MarkdownModule.forRoot({ loader: HttpClient }),
NbCardModule,
],
})
export class AboutModule {}
Example #16
Source File: app.module.ts From ngx-colors with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
CustomTriggerExampleComponent,
DocumentViewerComponent,
HideElementsExampleComponent,
CustomPaletteExampleComponent,
ChangeAcceptLabelExampleComponent
],
imports: [
HighlightModule,
BrowserModule,
ReactiveFormsModule,
BrowserAnimationsModule,
AppRoutingModule,
NgxColorsModule,
MatTabsModule,
FormsModule,
HttpClientModule,
MatInputModule,
MatSlideToggleModule,
MatButtonModule
],
providers: [
{
provide: HIGHLIGHT_OPTIONS,
useValue: {
languages: getHighlightLanguages()
}
}
],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #17
Source File: app.module.ts From Collab-Blog with GNU General Public License v3.0 | 6 votes |
@NgModule({
declarations: [
AppComponent,
BlogListComponent,
AddBlogComponent,
NavbarComponent,
WelcomePageComponent,
ViewBlogComponent,
UpdateBlogComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
ReactiveFormsModule,
MatButtonModule,
MatCardModule,
MatInputModule,
MatListModule,
MatToolbarModule,
MatSliderModule,
MatMenuModule,
MatFormFieldModule,
BrowserAnimationsModule,
FormsModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #18
Source File: app.module.ts From master-frontend-lemoncode with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
MenuComponent,
UserListComponent,
HighlightDirective,
SearchByLoginPipe
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
ReactiveFormsModule,
HttpClientModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #19
Source File: app.module.ts From league-profile-tool with MIT License | 6 votes |
@NgModule({
declarations: [AppComponent, HomeComponent, StatusComponent, DialogComponent, ChibiComponent, BackgroundComponent, ChampionsPipe, ChatrankComponent, ChampionPurchaseDateComponent, CustomapiComponent, FaqComponent, CustomiconComponent, IconsPipe, PracticetoolComponent],
imports: [
BrowserModule,
FormsModule,
CoreModule,
AppRoutingModule,
MatTabsModule,
BrowserAnimationsModule,
MatCardModule,
MatButtonModule,
MatInputModule,
MatDialogModule,
MatSelectModule,
MatSortModule,
HttpClientModule,
],
providers: [ElectronService],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #20
Source File: app.module.ts From mslearn-live-azure-fundamentals with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
ProductsListComponent,
AdminProductsListComponent,
ProductComponent,
AdminProductComponent,
AboutComponent,
NavmenuComponent,
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
ReactiveFormsModule,
RouterModule.forRoot([
{ path: 'home', component: AboutComponent },
{ path: 'product/:productId', component: ProductComponent },
{ path: 'products', component: ProductsListComponent },
{ path: 'admin/products', component: AdminProductsListComponent },
{ path: 'admin/product/:productId', component: AdminProductComponent },
{ path: '**', redirectTo: 'home' }
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #21
Source File: app.module.ts From mylog14 with GNU General Public License v3.0 | 6 votes |
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
HttpClientModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: (LanguageLoader),
deps: [HttpClient],
}
}),
CoreModule,
SharedModule,
LottieModule.forRoot({ player: playerFactory }),
ReactiveFormsModule,
FormlyModule.forRoot(),
FormlyIonicModule
],
providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #22
Source File: app.module.ts From ng-spotify-importer with GNU General Public License v3.0 | 6 votes |
@NgModule({
imports: [
BrowserModule,
RouterModule.forRoot([], { relativeLinkResolution: 'legacy' }),
FormsModule,
BrowserAnimationsModule,
MatDialogModule,
HttpClientModule,
],
declarations: [
AppComponent,
SpotifyAuthComponent,
PlaylistEditorComponent,
FileReaderComponent,
NotificationComponent,
SongDetailsComponent,
CleanupUnknownSongsHelpComponent
],
providers: [
{ provide: 'SpotifyWebApiJs', useClass: SpotifyWebApi }
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #23
Source File: app.module.ts From nica-os with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
...components,
...directives,
...pipes
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
FontAwesomeModule,
CommonsModule,
StoreModule.forRoot({app: appReducer, fs: fileExplorerReducer}),
EffectsModule.forRoot([AppEffects]),
StoreDevtoolsModule.instrument({maxAge: 25, logOnly: environment.production})
],
providers: [...services],
bootstrap: [AppComponent]
})
export class AppModule {}
Example #24
Source File: app.module.ts From msfs-community-downloader with GNU Affero General Public License v3.0 | 6 votes |
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
CoreModule,
SharedModule,
HomeModule,
ListEditorModule,
ImportModule,
SettingsModule,
AppRoutingModule,
FontAwesomeModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #25
Source File: app.module.ts From TheHungryRecipesApp with GNU General Public License v3.0 | 6 votes |
@NgModule({
declarations: [
AppComponent,
NavbarComponent,
LoginComponent,
RegistrationComponent
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule,
MaterialModule,
MatCardModule,
MatTabsModule,
MatGridListModule,
FormsModule,
MatInputModule,
MatFormFieldModule,
MatButtonModule,
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #26
Source File: app.module.ts From acnh.directory with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
PrivacyComponent,
DirectoryComponent
],
imports: [
HttpClientModule,
BrowserModule,
AppRoutingModule,
FormsModule,
ReactiveFormsModule,
NgMultiSelectDropDownModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #27
Source File: app.module.ts From leapp with Mozilla Public License 2.0 | 6 votes |
@NgModule({
declarations: [AppComponent, TrayMenuComponent],
imports: [
ComponentsModule,
MatSnackBarModule,
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
NgSelectModule,
LayoutModule,
TooltipModule.forRoot(),
ModalModule.forRoot(),
ToastrModule.forRoot(),
],
entryComponents: [ConfirmationDialogComponent, InputDialogComponent],
providers: [{ provide: ErrorHandler, useClass: ErrorService }],
bootstrap: [AppComponent],
})
export class AppModule {}
Example #28
Source File: auth.guard.spec.ts From barista with Apache License 2.0 | 6 votes |
describe('AuthGuard', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule, HttpClientModule],
providers: [AuthService, AuthGuard],
}).compileComponents();
});
it('should ...', inject([AuthGuard], (guard: AuthGuard) => {
expect(guard).toBeTruthy();
}));
});
Example #29
Source File: app.module.ts From OrchardSkills.OrchardCore.Headless with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
NavbarComponent,
BlogContentComponent,
BlogComponent
],
imports: [
BrowserModule,
AppRoutingModule,
RouterModule,
GraphQLModule,
HttpClientModule,
NgxPaginationModule,
HttpClientModule,
MarkdownModule.forRoot({
loader: HttpClient,
markedOptions: {
provide: MarkedOptions,
useValue: {
gfm: true,
tables: true,
breaks: true,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: true,
}
}
}),
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }