Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ivy): support multiple exportAs #27996

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 8, 2019

Allows for multiple, comma-separated exportAs names, similarly to ViewEngine.

These changes fix FW-708.

@crisbeto crisbeto self-assigned this Jan 8, 2019
@crisbeto crisbeto requested review from a team as code owners January 8, 2019 20:26
@mary-poppins
Copy link

You can preview 7b89b3e at https://pr27996-7b89b3e.ngbuilds.io/.

@mary-poppins
Copy link

You can preview d97ab1f at https://pr27996-d97ab1f.ngbuilds.io/.

@mary-poppins
Copy link

You can preview f828c7f at https://pr27996-f828c7f.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 90d6a83 at https://pr27996-90d6a83.ngbuilds.io/.

@crisbeto crisbeto changed the title wip(ivy): support multiple exportAs fix(ivy): support multiple exportAs Jan 8, 2019
@crisbeto crisbeto removed their assignment Jan 8, 2019
@crisbeto crisbeto added type: bug/fix action: review The PR is still awaiting reviews from at least one requested reviewer comp: ivy and removed state: WIP labels Jan 8, 2019
@ngbot ngbot bot added this to the needsTriage milestone Jan 8, 2019
@@ -117,7 +117,8 @@ function baseDirectiveFields(
definitionMap.set('outputs', conditionallyCreateMapObjectLiteral(meta.outputs));

if (meta.exportAs !== null) {
definitionMap.set('exportAs', o.literal(meta.exportAs));
const exportAsValues = meta.exportAs.split(',').map(part => o.literal(part.trim()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta.exportAs should already be split here. We should do that processing for AOT in ngtsc/annotations/src/directive.ts and for JIT in render3/jit/directive.ts.

For the compiler, it's actually a little more complicated as exportAs is one of the metadata elements written to .d.ts files, so that needs to change as well. Additionally there's the template type-checking code which matches against this...

Let me make you a precursor PR for the compiler which adds this support that you can build on.

@mary-poppins
Copy link

You can preview d021ced at https://pr27996-d021ced.ngbuilds.io/.

Allows for multiple, comma-separated `exportAs` names, similarly to `ViewEngine`.

These changes fix FW-708.
@mary-poppins
Copy link

You can preview a9a2519 at https://pr27996-a9a2519.ngbuilds.io/.

@kara kara added target: major This PR is targeted for the next major release and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jan 10, 2019
@kara
Copy link
Contributor

kara commented Jan 10, 2019

presubmit

@alxhub
Copy link
Member

alxhub commented Jan 10, 2019

core/todo/bundle increased by 41 bytes.

Unacceptable!! ;)

@kara kara added the action: merge The PR is ready for merge by the caretaker label Jan 10, 2019
wKoza pushed a commit to wKoza/angular that referenced this pull request Jan 18, 2019
Allows for multiple, comma-separated `exportAs` names, similarly to `ViewEngine`.

These changes fix FW-708.

PR Close angular#27996
wKoza pushed a commit to wKoza/angular that referenced this pull request Jan 18, 2019
Allows for multiple, comma-separated `exportAs` names, similarly to `ViewEngine`.

These changes fix FW-708.

PR Close angular#27996
ngfelixl pushed a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019
Allows for multiple, comma-separated `exportAs` names, similarly to `ViewEngine`.

These changes fix FW-708.

PR Close angular#27996
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants