Skip to content

Insert template in different element (component) #2501

@georgecoca

Description

@georgecoca

Hi. I would like to insert the template of a component in a different element but maintain the components tree structure. To be more precise, I have a component (bootstrap modal) which is rendered in the middle of the html content. Now the problem is that the styles of the modal inherits from parent, so what I want to archive is to have my component right there but the template to be inserted just before body end tag

I have tried to put a basic example here and I can't get it working: https://jsfiddle.net/fkm1qtb1/2/ . As you can see, the text is red because the parent element has that color which applies on children too. So I want the template to be inserted on a custom element that is not affected by the color (on this example)

Is this possible, I'm doing something wrong ?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions