Skip to content

Conversation

michaelkrog
Copy link

@michaelkrog michaelkrog commented Dec 16, 2020

This PR adds support for:

  • native custom element tag names (fx. <app-talk title="My talk"></app-talk>)
  • content projection via ng-content (fx. <app-talk><span>This is projected</span></app-talk>)
  • less verbose configuration when many components are registered.

This commit adds support for:

* native custom element tag names
* content projection via ng-content
* less verbose configuration when many components are registered.
@michaelkrog michaelkrog changed the title Adds eg-brs extension Adds eg-brs extensions Dec 16, 2020
@@ -97,7 +106,7 @@ export class NgxElementComponent implements OnInit, OnDestroy {
for (let attr, i = 0; i < attrs.length; i++) {
attr = attrs[i];

if (attr.nodeName.match('^data-')) {
if ((!this.registry.useCustomElementNames && attr.nodeName.match('^data-')) || this.registry.useCustomElementNames) {
Copy link
Owner

Choose a reason for hiding this comment

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

The property useCustomElementNames in the registry also affects the attributes that can be passed to the element?

@brunob15 brunob15 added the enhancement New feature or request label Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants