Skip to content

Don't use native element types directly (label: universal) #523

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

Closed
paullryan opened this issue May 25, 2016 · 3 comments
Closed

Don't use native element types directly (label: universal) #523

paullryan opened this issue May 25, 2016 · 3 comments

Comments

@paullryan
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

material2 components should be compilable by a server side renderer such as angular-universal

What is the current behavior?

Compile fails because of direct use of native elements such as HTMLElement.

What are the steps to reproduce?

Follow the readme for my test repo at https://github.com/SimplyComplexCo/material-universal-test. Once overlay is functional adding providers for more material2 components will mostly also fail.

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

Angular Universal support, I understand that #308 is creating a consistent test to keep this functionality in mind.

This issue is to spur the parallel change of making the current functionality work with Angular Universal.

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

Angular Material master

@paullryan
Copy link
Author

Instead of HTMLElement and ElementRef should be used such as

foo(element: ElementRef) {
  let nativeElement: any = element.nativeElement;
  // Do thing with native element
}

@jelbourn
Copy link
Member

This is going to be addressed as part of #308

andrewseguin pushed a commit to andrewseguin/components that referenced this issue Oct 15, 2018
The WebAnimation polyfill hasn't been required since Angular 6.
@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 4, 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