Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to own string html by object #15

Closed
wants to merge 1 commit into from
Closed

Add support to own string html by object #15

wants to merge 1 commit into from

Conversation

luiz-simples
Copy link
Collaborator

I have a register of texts and I'm using htmling on the front end. So did functionality.

@phpnode
Copy link
Member

phpnode commented Dec 28, 2015

@luiz-simples thanks for your contribution but I don't think this is the right way to handle this. The solution I've been using involves registering a custom element, like this:

const templates = HTMLing.dir(viewDir, {
    watch: true,
    elements: {
      'raw-html': function (params) {
        return params.content;
      }
    }
  });

usage:

<h1>Hello <raw-html content="{{name}}" /></h1>

@phpnode phpnode closed this Dec 28, 2015
@luiz-simples
Copy link
Collaborator Author

tks lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants