I want to make a datepicker in an Angular Material application, only for month picking. In the App Module I set up some providers for date locales whi ...
I want to make a datepicker in an Angular Material application, only for month picking. In the App Module I set up some providers for date locales whi ...
I am trying to use APP_INITIALIZER to do initial call for env values but for some reason service that have this function is undefined during runInitia ...
I would like use provider value defined in other module. Here is example: app.module.ts theme.module.ts Is there possibility to pass VALUE defi ...
I am implementing caching only for gift card module and I have created http-cache.service and cache interceptor.When I add the service in app.module.t ...
I want to add my authentication token in request header in my auth.interceptor.ts and I'm keeping authentication token value in my auth.service.ts. He ...
I need to have a module that does instantiate another one with a custom variable like the following. // app.module.ts MyServiceModule.forRoot({ cust ...
I am trying to create a reusable date picker component. One of the features is that you can choose a periodLevel. Such as monthly daily or yearly. The ...
I want a single token to be resolve in two different services at run time in angular component. I am adding the tokens to providers array in module as ...
I have a library with a component that has a provider, like so- This component is being rendered in my angular project and that service has methods ...
I moved service into seperated npm package. Although the service is marked to be provided in root injector when I try to use it in my app I get NullIn ...
In value-based providers (tokens), we have something like this (in the module): Because we defined the provider in module, in a service we can do t ...
I want to dynamically provide 'FormatDate' based on input 'format' parameter. If format === 'short' then useValue: 'MM.yy'. If format === 'long' the ...
i want to implement a service and let it provide to only one named component or module and not to any other component or module. So whenever anyone t ...
I have service1 depending on an other service2. Service2 has one parameter in its constructor. When declaring service2 in the constructor of service ...
I am trying to figure out how to use useFactory as an async function in Angular 11. Right now I have this: import { ApolloClientOptions } from 'apoll ...
I created a component and service in my project. According to documentation while using the service you should include it in providers metadata of the ...
I have the next provider configuration How to make an HTTP call from useFactory function (initializeKeycloak)? I want to get this value from the ...
I import RecruiterAdminChatsComponent at AppModule and I defined the socket service at app.comonent.ts like the following and to use socketservi ...
I have to test one component and get this error NullInjectorError: R3InjectorError(DynamicTestModule)[AuthenticationService -> Router -> Router] ...
I have a provider in AppModule which provides a class. Is there a way to update the provided value at runtime? How can replace SomeClass with Anot ...