Skip to content

Commit eaac970

Browse files
fix(effects): update ng-add schematic to use inject function (#5141)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a79b136 commit eaac970

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

modules/effects/schematics/ng-add/files/__name@dasherize@if-flat__/__name@dasherize__.effects.spec.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TestBed, inject } from '@angular/core/testing';
1+
import { TestBed } from '@angular/core/testing';
22
import { provideMockActions } from '@ngrx/effects/testing';
33
import { Observable } from 'rxjs';
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Injectable } from '@angular/core';
1+
import { inject, Injectable } from '@angular/core';
22
import { Actions, createEffect } from '@ngrx/effects';
33

44
@Injectable()
55
export class <%= classify(name) %>Effects {
6-
constructor(private actions$: Actions) {}
6+
private actions$ = inject(Actions);
77
}

0 commit comments

Comments
 (0)