fix(compiler): allow decorators defined in the same file
This commit is contained in:
parent
0d71345b93
commit
c1154b30c7
|
@ -19,3 +19,9 @@ export function NotADirective(c: any): void {}
|
|||
@NotADirective
|
||||
export class HasCustomDecorator {
|
||||
}
|
||||
|
||||
// Verify that custom decorators have metadata collected, eg Ionic
|
||||
export function Page(c: any): (f: Function) => void {return c;}
|
||||
|
||||
@Page({template: 'Ionic template'})
|
||||
export class AnIonicPage {}
|
||||
|
|
|
@ -345,8 +345,12 @@ export class StaticReflector implements ReflectorReader {
|
|||
case "new":
|
||||
case "call":
|
||||
let target = expression['expression'];
|
||||
if (target['module']) {
|
||||
staticSymbol =
|
||||
_this.host.findDeclaration(target['module'], target['name'], context.filePath);
|
||||
} else {
|
||||
staticSymbol = _this.host.getStaticSymbol(context.filePath, target['name']);
|
||||
}
|
||||
let converter = _this.conversionMap.get(staticSymbol);
|
||||
if (converter) {
|
||||
let args = expression['arguments'];
|
||||
|
|
Loading…
Reference in New Issue