Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

es2015/es6 directive support #953

Closed
epelc opened this issue Dec 21, 2018 · 2 comments
Closed

es2015/es6 directive support #953

epelc opened this issue Dec 21, 2018 · 2 comments

Comments

@epelc
Copy link
Contributor

epelc commented Dec 21, 2018

Bug Report

What is the expected behavior?

The layout directive(and I think others like flex directive) do not work when targeting es6 in your tsconfig. Everything works fine when targeting es5. I also suspect this might affect the custom breakpoint directives because they are also subclasses.

What is the current behavior?

You get an error that init is not a method on undefined because I assume the constructor arguments are not injected on subclasses.
image
image

core.js:18374 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'init' of undefined

Basically none of the arguments are injected.

What are the steps to reproduce?

Providing a StackBlitz (or similar) is the best way to get the team to see your issue.

Change the value of "target" in tsconfig.js to es6.

What is the use-case or motivation for changing an existing behavior?

Compiling smaller libs with newer/faster es6

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

7.0 beta 22

Is there anything else we should know?

Angular material had the same issue and it was very finicky but has finally been fixed in angular/components#13834. It is really due to an underlying issue with angular itself which ivy is supposed to fix but there is an outstanding PR to fix it in the current renderer.

@devversion has dealt with fixing this heavily perhaps he could advise best course of action? There were a lot of pitfalls during the fixes for angular material so hopefully he has some input on the final fix.

@CaerusKaru
Copy link
Member

Duplicate of #950

@CaerusKaru CaerusKaru marked this as a duplicate of #950 Dec 21, 2018
@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants