peerlibrary / meteor-blaze-components

Reusable components for Blaze
http://components.meteorapp.com/
BSD 3-Clause "New" or "Revised" License
354 stars 26 forks source link

How to render component with data on Alertify JS? #124

Closed thearabbit closed 8 years ago

thearabbit commented 8 years ago

I would like to render component with data on alertify js

<template name="myComponent">
.............
</template>

class myComponent extends BlazeComponent{
............
}
myComponent.register('myComponent');
// Get component to render on Alertify JS
alertify.alert('Title', /*...render template component...*/);

Please help me.

thearabbit commented 8 years ago

I used to Blaze like this

renderTemplate = function (template, data) {
    var node = document.createElement("div");
    document.body.appendChild(node);
    var instance = Blaze.renderWithData(template, data, node);

    return {
        instance: instance,
        html: node
    };
};

Pleas advice for Blaze Component

mitar commented 8 years ago

See documentation here.