Closed sackIndian closed 11 years ago
Hi,
I am using hogan with Fruitmachine.js,
Sample senario, Here i define modules as
var Masthead = fruitmachine.define({ name: 'masthead', template: templateMasthead, });
var templateMasthead = Hogan.compile("{{title}}");
Now i provide json data for fruitmachine as
var layout = { module: 'masthead', model: { title: '
when i inject view to div, it displays html tags along with string values?
How to handle these kind of situations? (json response from server contains html tags)
Thank you,
It looks to me as though you are looking for the triple mustache. This will make sure that Mustache/Hogan will not escape html.
var templateMasthead = Hogan.compile("{{{title}}}");
Hi,
I am using hogan with Fruitmachine.js,
Sample senario, Here i define modules as
var Masthead = fruitmachine.define({ name: 'masthead', template: templateMasthead, });
var templateMasthead = Hogan.compile("{{title}}");
Now i provide json data for fruitmachine as
var layout = { module: 'masthead', model: { title: '
Article viewer
Main name
' } }; var view = fruitmachine(layout); view .render() .inject(document.getElementById('app'))when i inject view to div, it displays html tags along with string values?
How to handle these kind of situations? (json response from server contains html tags)
Thank you,