MCPcopy Create free account
hub / github.com/angular/angular / SomeDir

Class SomeDir

packages/core/test/test_bed_spec.ts:2086–2099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2084 const A = new InjectionToken('A');
2085
2086 @Directive({
2087 selector: '[dir]',
2088 providers: [{provide: A, useValue: 'A'}],
2089 })
2090 class SomeDir {
2091 constructor(
2092 @Inject(A) private tokenA: string,
2093 private elementRef: ElementRef,
2094 ) {}
2095
2096 ngAfterViewInit() {
2097 this.elementRef.nativeElement.innerHTML = this.tokenA;
2098 }
2099 }
2100
2101 const SomeComponent = getAOTCompiledComponent(true, [SomeDir]);
2102 TestBed.configureTestingModule({imports: [SomeComponent]});

Callers

nothing calls this directly

Calls 1

DirectiveClass · 0.90

Tested by

no test coverage detected