Skip to content

How can I render html both in component element and out component element? #294

Description

@qlfy17

First,define the primary-button component,like this:

@controller
class PrimaryButtonElement extends HTMLElement {
  connectedCallback(){
       const itemTemplate = () => {
           return html`
          <button>
              ???
          </button>
          `
        }

        render(itemTemplate(), this)
   }
}

Then,use the component like this,

<primary-button>new issue</primary-button>

The question is how to render the component's content in the controller?
Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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