Category "angular-services"

Angular 7 shared service for siblings component to get data from other sibling

In my Angular 7 app I have two sibling componentns... configurator component and custom stepper component. In configurator component I have some functions that

how can i show the data received from backend api in angular

Im currently trying to show the data of an employee after he loggin to his account, i can get the data of the employee from the backend by his username and i ca

Angular error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays

I'm making a get to an API in my Angular project and I get this JSON: { "data": { "success": true, "historical": true, "date": "2022-01-01", "

access DOCUMENT in useFactory

I want to inject @Inject(DOCUMENT) in factory. How to inject it since it is not service therefor I can't add it in deps. // import { DOCUMENT } from '@angular/c

How can I get data from service in Angular interceptor?

I want to add my authentication token in the request header in my auth.interceptor.ts and I'm keeping the authentication token value in my auth.service.ts. Here

Are Angular Service Modules still required?

In the angular docs, it lists the types of feature modules that one can implement. One of those being a service module. https://angular.io/guide/module-types

Service: typeof is not assignable to type 'Provider[]'

I am getting error: tried using like: "useClass: ApidataService" or "ApidataService" in providers and also remove public from the service constructor. Failed t