docs: use TS Parameter properties in SkipSelf example (#40858)
PR Close #40858
This commit is contained in:
parent
4ec045e12b
commit
e3c21c5465
|
@ -103,9 +103,7 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
class NeedsDependency {
|
class NeedsDependency {
|
||||||
constructor(@SkipSelf() public dependency: Dependency) {
|
constructor(@SkipSelf() public dependency: Dependency) {}
|
||||||
this.dependency = dependency;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const parent = Injector.create({providers: [{provide: Dependency, deps: []}]});
|
const parent = Injector.create({providers: [{provide: Dependency, deps: []}]});
|
||||||
|
|
Loading…
Reference in New Issue