AUR0717
Template compilation error: detected a usage of "<slot>" element without specifying shadow DOM options in element yyyy
Error message
Parameters
Error explanation
Common causes
How to fix
import { customElement, useShadowDOM } from 'aurelia'; @customElement({ name: 'my-element', template: `<div><slot></slot></div>`, shadowOptions: { mode: 'open' } // or 'closed' }) export class MyElement { } // Or use the decorator: @customElement('my-element') @useShadowDOM({ mode: 'open' }) export class MyElement { }
Example of Incorrect Usage:
Example of Correct Usage (with Shadow DOM):
Example of Correct Usage (without Shadow DOM, using au-slot):
Last updated
Was this helpful?