fix(compiler): support interface types in injectable constuctors (#14894)
Fixes #12631
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
|
||||
import {Component, Inject, LOCALE_ID, TRANSLATIONS_FORMAT} from '@angular/core';
|
||||
|
||||
import {CUSTOM, Named} from './custom_token';
|
||||
|
||||
@Component({
|
||||
selector: 'basic',
|
||||
@ -21,7 +22,8 @@ export class BasicComp {
|
||||
ctxArr: any[] = [];
|
||||
constructor(
|
||||
@Inject(LOCALE_ID) public localeId: string,
|
||||
@Inject(TRANSLATIONS_FORMAT) public translationsFormat: string) {
|
||||
@Inject(TRANSLATIONS_FORMAT) public translationsFormat: string,
|
||||
@Inject(CUSTOM) public custom: Named) {
|
||||
this.ctxProp = 'initialValue';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user