Top "Angular-services" questions

Angular services are substitutable objects that are wired together using dependency injection.

Unit testing with private service injected using jasmine angular2

I have a problem trying to unit test an angular service. I want to verify that this service is properly …

angular karma-jasmine angular-services injectable spyon
Angular 2 Injected Service is undefined

Why is my service (this.loggerService) undefined in my DataHandlerService when it has been injected? I thought dependency injection took …

angular dependency-injection angular-services
Set $httpProvider default headers after user authentification

I am considering to add a default header for the $http service, which value is an access token that will …

angularjs angular-services
Invalid provider for the NgModule 'DynamicTestModule' when testing a service in Angular 2

I have the following service: import { Injectable } from '@angular/core'; import { MenuItem } from './../classes/menu-item'; import { ITEMS } from …

javascript angular testing angular-services
Angular, show loading when any resource is in pending

I already write a code to display a loader div, when any resources is in pending, no matter it's getting …

angularjs angular-services
Angular 5 download excel file with post request

I am facing an issue where I have downloaded an Excel file with Angular 1 but if I am implementing the …

angular angular-services
Angular 7 - Reload / refresh data different components

How to refresh data in different component 1 when changes made in component 2. These two components are not under same parentnode. …

angular angular-services angular-components reloaddata
Angular 9 : Error NG2003: No suitable injection token for parameter 'url' of class 'DataService'. Found string

While working on a program that I am facing an issue with, constructor and its dependency injection from its child …

angular dependency-injection angular-services
Angular v4: Do we store data in a Service or the Component or both?

Angular v4: Do we store data in a Service or the Component or both? After reviewing quite a few tutorials, …

javascript angular angular-services
Circular dependency detected in Angular 7

I have the following app structure in my Angular 7 app: AppModule DashboardModule DashboardChild1 DashboardChild2 DashboardChild3 DashboardService AdminModule AdminChild1 AdminChild2 AdminChild3 …

angular angular-services angular-ngmodel angular-module