-
Notifications
You must be signed in to change notification settings - Fork 319
Closed
Description
I am following a controller as attribute pattern (coming from Angular world):
const DEFAULT_TEXT = 'This is the default Text';
export class ButtonController {
constructor(public text,
public color,
public onClick: () => void) {
}
public reset() {
this.text = DEFAULT_TEXT;
}
}
export class ButtonComponent extends LitElement {
static get properties() {
return {
ctrl: ButtonController
};
}
}
customElements.define('bk-button', ButtonComponent);
Any ideas on how can I pass an instance of ButtonController
to <bk-button ctrl=btnCtrl></bk-button>
.
Metadata
Metadata
Assignees
Labels
No labels