components icon indicating copy to clipboard operation
components copied to clipboard

feat: publish Angular Elements for all components

Open Suresh918 opened this issue 7 years ago • 10 comments

Please describe the feature you would like to request.

Implement custom components using angular elements for angular material components

What is the use-case or motivation for this proposal?

If custom components implemented, we can use them in any application irrespective of the frame work (i.e. outside angular as well)

Is there anything else we should know?

Suresh918 avatar Feb 14 '19 13:02 Suresh918

We've looked into using Angular Elements for our Material components and found that if we want to do this, we'll need to reconsider the API since we heavily rely on content projection for our components.

Here's an example of what it would look like if we went this route: https://stackblitz.com/edit/angular-ronyna?file=src%2Findex.html

The concept of packaging the components as elements is very exciting since it opens the library up to all users, but it will likely mean supporting an alternative and more restrictive set of APIs for each component.

andrewseguin avatar Feb 14 '19 17:02 andrewseguin

Hi @andrewseguin, I have a question but I am not sure if it makes much sense. Has it ever been considered to use slots for content projection with Shadow DOM v1?

manuelreina avatar May 25 '20 14:05 manuelreina

Has it ever been considered to use slots for content projection with Shadow DOM v1?

Slots cannot be lazy rendered as far as I know. So, the component is rendered and connected right away. Sometimes material supports lazy rendering of templates due to performance reasons.

klemenoslaj avatar May 25 '20 17:05 klemenoslaj

Has it ever been considered to use slots for content projection with Shadow DOM v1?

Slots cannot be lazy rendered as far as I know. So, the component is rendered and connected right away. Sometimes material supports lazy rendering of templates due to performance reasons.

Understood thanks. Regarding a microfrontend approach, it would be nice to load material custom elements on demand.

manuelreina avatar May 26 '20 09:05 manuelreina

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Feb 21 '22 15:02 angular-robot[bot]

pretty please! 👍

greghopkins avatar Feb 23 '22 18:02 greghopkins

👍

fjcasternao avatar Feb 23 '22 18:02 fjcasternao

👍

julio393 avatar Feb 24 '22 13:02 julio393

👍

FMaccarelli avatar Feb 24 '22 13:02 FMaccarelli

@andrewseguin Do you have any plans to reconsider creating web components for all material components?

DanAnton avatar Sep 11 '24 09:09 DanAnton