All Questions
Tagged with angular-standalone-components angular-services
5
questions
0
votes
1
answer
86
views
Angular 17: Standalone components and not a root service
How can I provide a service that is not at the root of the application, and use the same instance between several components and other services? Not using providers in routes and not using ng module.
...
1
vote
1
answer
126
views
Angular Standalone - How to Inject Service into Service
I'm a longtime Angular dev now trying to learn the standalone version. How do I inject a service into another service without a providers array in the NgModule. Is my only choice using providedIn in ...
2
votes
1
answer
982
views
How to include Angular services with lazy-loaded standalone component routes?
I have an Angular 17 application using standalone components, the initial routes are set up like so in app.routes.ts
export const appRoutes: Array<Route> = [
{ path: '', redirectTo: '/...
21
votes
6
answers
19k
views
NullInjectorError - Root standalone component does not import HttpClientModule properly
I have an issue, I want to rewrite my app code and change main module to main root standalone component pointed in main.ts.
All works fine but I have an issue with HttpClientModule. I am using ...
-1
votes
1
answer
975
views
Angular service to transfer data between components (standalone components - NG14) [closed]
I know we can use a service, @Input and @Output so move data between components.
For example I can have this in a service:
@Injectable()
export class MyService {
myMethod$: Observable<any>;
...