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
|
@NotADirective
|
||||||
export class HasCustomDecorator {
|
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 "new":
|
||||||
case "call":
|
case "call":
|
||||||
let target = expression['expression'];
|
let target = expression['expression'];
|
||||||
|
if (target['module']) {
|
||||||
staticSymbol =
|
staticSymbol =
|
||||||
_this.host.findDeclaration(target['module'], target['name'], context.filePath);
|
_this.host.findDeclaration(target['module'], target['name'], context.filePath);
|
||||||
|
} else {
|
||||||
|
staticSymbol = _this.host.getStaticSymbol(context.filePath, target['name']);
|
||||||
|
}
|
||||||
let converter = _this.conversionMap.get(staticSymbol);
|
let converter = _this.conversionMap.get(staticSymbol);
|
||||||
if (converter) {
|
if (converter) {
|
||||||
let args = expression['arguments'];
|
let args = expression['arguments'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user