windows 10 pro office 2019 pro office 365 pro windows 10 home windows 10 enterprise office 2019 home and business office 2016 pro windows 10 education visio 2019 microsoft project 2019 microsoft project 2016 visio professional 2016 windows server 2012 windows server 2016 windows server 2019 Betriebssysteme office software windows server https://softhier.com/ instagram takipçi instagram beğeni instagram görüntüleme instagram otomatik beğeni facebook beğeni facebook sayfa beğenisi facebook takipçi twitter takipçi twitter beğeni twitter retweet youtube izlenme youtube abone instagram

Using the Aurelia element

Asked By: Anonymous

I’m trying to create a custom element that allows the user to specify the element’s content when creating the element, like this:

<custom-element title="Hello">
    <p>Lorem ipsum dolor sit amet.</p>
    <p>Lorem ipsum dolor sit amet.</p>
    <p>Lorem ipsum dolor sit amet.</p>
</custom-element>

And my custom element essentially looks like this:

<template>
    <div class="my-custom-element">
        <h2 if.bind="title">${title}</h2>
        <content></content>
    </div>
</template>

I’ve totally guessed at the use of the <content> element and it doesn’t work like this it seems. I can’t find any documentation on it either. I’ve seen others use it with a select attribute pointing to a specific element inside the custom element’s contents but I want to access everything inside it – not a particular element.

What am I doing wrong?


Solution

Answered By: Anonymous

Aurelia uses <slot> element to render content within custom elements. You can read about it in documentation hub, or take a look at blog post where they explain the reasoning for <slot> elements. Basically, it’s a part of Shadow DOM v1 specification and Aurelia team tries to follow the standards wherever possible.

One cool thing with <slot> is that you can have multiple named ones in your custom element, which is explained in post above.

So, your custom element would look something like this:

<template>
    <div class="my-custom-element">
        <h2 if.bind="title">${title}</h2>
        <slot></slot>
    </div>
</template>

Of course, this means that you’ll need to use the newer version of Aurelia, since this has been added sometime at the end of May.

techinplanet staff

Porno Gratuit Porno Français Adulte XXX Brazzers Porn College Girls Film érotique Hard Porn Inceste Famille Porno Japonais Asiatique Jeunes Filles Porno Latin Brown Femmes Porn Mobile Porn Russe Porn Stars Porno Arabe Turc Porno caché Porno de qualité HD Porno Gratuit Porno Mature de Milf Porno Noir Regarder Porn Relations Lesbiennes Secrétaire de Bureau Porn Sexe en Groupe Sexe Gay Sexe Oral Vidéo Amateur Vidéo Anal

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno