You need to use the containerless decorator on your component.
From the documentation Section for custom elements :
@containerless() - calls the visualization of the element view without the container of the user element that wraps it. This cannot be used in conjunction with @sync or @useShadowDOM . It also cannot be used with surrogate behavior.
So your component should look like this:
import {customElement, bindable, containerless} from 'aurelia-framework'; @customElement('say-hello') @containerless() export class SayHello { @bindable to; speak(){ alert(`Hello ${this.to}!`); } }
source share