Skip to content
This repository has been archived by the owner on Jul 5, 2019. It is now read-only.

feat: Add ApiService #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat: Add ApiService #1

wants to merge 4 commits into from

Conversation

chloe463
Copy link
Owner

@chloe463 chloe463 commented Oct 25, 2018

WHY & WHAT

BASICS

  1. Install angular-in-memory-web-api
  2. Import HttpClientModule and HttpClientInMemoryWebApiModule from libraries to AppModule
  3. Create mock database. (Just a ts file)
  4. Generate ApiService using @angular/cli command (ng g s services/api)
  5. Add functions to ApiService and refactor AppComponent to make it possible to call (mock-) WebAPI.

ADVANCED

  1. Add switchMapTo to avoid nested subscribes
  2. Use async pipe in angular-template.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant