Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Rendering HTML with injected Components in HBS templates

$
0
0

@Alonski wrote:

Hey friends, I have a problem that is outside of my current knowledge and I was wondering if I could get some insight from the community.

I have a page which renders different HTML depending on user interaction and this HTML is requested from the server as a string.

In the past this string was saved as a property and using HTML.SafeString would be injected into the wrapping template. HTML Example:

<html>
    <body>
        <input/>
    </body>
</html>

Right now we want to add components to this HTML during runtime or on the server. Lets say for simplicity it is from the server. HTML Example:

<html>
    <body>
        {{special-input}}
    </body>
</html>

How should I push this to the wrapping template? SafeString doesn’t work here and just outputs the component as text.

I thought of using hbs-template-inline but am not sure exactly how to do that.

Thanks!

Posts: 7

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles