jeudi 28 septembre 2017

How can I write custom handlebars in Ember js?

js:

Ember.Handlebars.registerHelper('demo-helper', function (property, options) {
    console.log('demo helper');
    return '<li><a> '+ msg+'</a></li>';
});

hbs :

msg

How can I wrap hi (inner html of handlebar) with any custom tag?.I know that component has tag parameter that encapsulates html with given tag. But it supports only one tag. I want to encapsulate with multiple tags like

<li><a>innerhtml</a></li>




Aucun commentaire:

Enregistrer un commentaire