Learning Angular - Fourth Edition by Aristeidis Bampakos & Pablo Deeleman
Author:Aristeidis Bampakos & Pablo Deeleman
Language: eng
Format: epub
Publisher: Packt
Published: 2023-02-15T00:00:00+00:00
Fetching data through HTTP
The product list component uses the products service to fetch and display product data. Data are currently hardcoded into the products property of the ProductsService class. In this section, we will modify our Angular application to work with live data from the Fake Store API:
Open the app.module.ts file and import the Angular module of the HTTP client: import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpClientModule } from '@angular/common/http'; import { AppComponent } from './app.component'; import { ProductsModule } from './products/products.module'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, HttpClientModule, ProductsModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
| ActiveX | ASP.NET |
| Cold Fusion | CSS |
| DHTML | Java Server Pages |
| JavaScript | PHP |
| Python | Ruby |
| XSL |
The Mikado Method by Ola Ellnestam Daniel Brolund(11723)
Hello! Python by Anthony Briggs(11659)
Dependency Injection in .NET by Mark Seemann(10882)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(9298)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(8734)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(8441)
Svelte with Test-Driven Development by Daniel Irvine(8058)
Test-Driven Development with PHP 8 by Rainier Sarabia(7815)
Layered Design for Ruby on Rails Applications by Dementyev Vladimir;(7628)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(7337)
Web Development with Django by Ben Shaw Saurabh Badhwar(7124)
Kotlin in Action by Dmitry Jemerov(7111)
React Application Architecture for Production by Alan Alickovic(6819)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(6395)
Software Architecture for Web Developers by Mihaela Roxana Ghidersa(4933)
Audition by Ryu Murakami(4840)
Accelerating Server-Side Development with Fastify by Manuel Spigolon Maksim Sinik & Matteo Collina(4798)
Solidity Programming Essentials by Ritesh Modi(4516)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4410)