DEV Community

Discussion on: How to build an Angular 8 application with API request in 10 minutes?

rawrasaurus profile image

Nice simple tutorial for newbies to Angular such as myself. A side note for others like me tripping out because the GET requests are in pending and the page needs to be manually refreshed, it might be common sense but the order matters on how you import your services.

In this case the service should be imported first otherwise the request sits in pending, hope this helps and clears any apparent dilemma or confusion.

import { PhotosService } from '../../services/photos.service';
import { Component, OnInit } from '@angular/core';

Thanks for posting, happy coding!