Angular: registering providers from library using standalone approach
I have bootstrapped an Angular v18 workspace with an application and a library. I’ve created a service in the library and wanted to use that in the application. Everything organized with the standalone approach, without NgModules.
Injecting multiple implementations for the same provider in Angular
The problem I have the following setup in my Angular template: <mat-tab-group> <mat-tab *ngIf=”sees1″> <app-custom-table (columnButtonClick)=”service1.columnClicked($event)”> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees2″> <app-custom-table> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees3″> <app-custom-table> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees4″> <app-custom-table> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees5″> <app-custom-table (columnButtonClick)=”service5.columnClicked($event)”> </app-custom-table> </mat-tab> </mat-tab-group> I want each of the app-custom-table‘s to be injected with a different service implementation in […]
Injecting multiple implementations for the same provider in Angular
The problem I have the following setup in my Angular template: <mat-tab-group> <mat-tab *ngIf=”sees1″> <app-custom-table (columnButtonClick)=”service1.columnClicked($event)”> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees2″> <app-custom-table> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees3″> <app-custom-table> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees4″> <app-custom-table> </app-custom-table> </mat-tab> <mat-tab *ngIf=”sees5″> <app-custom-table (columnButtonClick)=”service5.columnClicked($event)”> </app-custom-table> </mat-tab> </mat-tab-group> I want each of the app-custom-table‘s to be injected with a different service implementation in […]
In Angular is it possible to use Resolution Modifiers with the inject method?
Is it possible to use inject() with resolution modifiers? All examples I see point to constructor injection.