fix(ivy): add missing exportAs field to ngDirectiveDef (#25392)
This commit includes the missing exportAs field from @Directive and propagates it into the ngDirectiveDef. PR Close #25392
This commit is contained in:

committed by
Ben Lesh

parent
5be186035f
commit
6f085f8610
@ -96,6 +96,12 @@ export interface R3DirectiveMetadata {
|
||||
* Whether or not the component or directive inherits from another class
|
||||
*/
|
||||
usesInheritance: boolean;
|
||||
|
||||
/**
|
||||
* Reference name under which to export the directive's type in a template,
|
||||
* if any.
|
||||
*/
|
||||
exportAs: string|null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -79,6 +79,9 @@ function baseDirectiveFields(
|
||||
if (features.length) {
|
||||
definitionMap.set('features', o.literalArr(features));
|
||||
}
|
||||
if (meta.exportAs !== null) {
|
||||
definitionMap.set('exportAs', o.literal(meta.exportAs));
|
||||
}
|
||||
|
||||
return {definitionMap, statements: result.statements};
|
||||
}
|
||||
@ -279,6 +282,7 @@ function directiveMetadataFromGlobalMetadata(
|
||||
inputs: directive.inputs,
|
||||
outputs: directive.outputs,
|
||||
usesInheritance: false,
|
||||
exportAs: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user