Вキ
Size: a a a
Вキ
AT
В
BO
KA
@NgModule()
export class MyModule {
static forRoot(
{ repo = ConcreteRepo }: { repo?: Type<AbstractRepo> } = {}
): ModuleWithProviders {
return {
ngModule: MyModule,
providers: [
{ useClass: repo, provide: AbstractRepo }
]
};
}
}
КС

Getter called
// component-example.component.html
<div *ngFor="let key of reportKeys">
<span>{{ reportKey }}</span>
</div>
// component-example.component.ts
export class ComponentExample implements OnInit {
public report: Report = { /** some object */ };
constructor(
) {}
ngOnInit() {
console.debug('ngOnInit fired');
}
get reportKeys(): string[] {
console.debug('Getter called');
return Array.from(this.report.keys());
}
}
Вキ
KA

Getter called
// component-example.component.html
<div *ngFor="let key of reportKeys">
<span>{{ reportKey }}</span>
</div>
// component-example.component.ts
export class ComponentExample implements OnInit {
public report: Report = { /** some object */ };
constructor(
) {}
ngOnInit() {
console.debug('ngOnInit fired');
}
get reportKeys(): string[] {
console.debug('Getter called');
return Array.from(this.report.keys());
}
}
И

Getter called
// component-example.component.html
<div *ngFor="let key of reportKeys">
<span>{{ reportKey }}</span>
</div>
// component-example.component.ts
export class ComponentExample implements OnInit {
public report: Report = { /** some object */ };
constructor(
) {}
ngOnInit() {
console.debug('ngOnInit fired');
}
get reportKeys(): string[] {
console.debug('Getter called');
return Array.from(this.report.keys());
}
}
Вキ
KA
КС
КС
КС
KA
Вキ
KA

N
N