활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Do we have any help article for handlebars integration in aem?
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
There are lots of libraries available like:
Displaying data from a flat JSON file on a Handlebars.js template file rendered with AJAX. · GitHub
AngularJS
VueJs (e.g.javascript - Fliter Json to HTML using Vue JS - Stack Overflow )
Unlike using libraries you can use do with jquery or javascript if structure is not complex and repetative.
조회 수
답글
좋아요 수
Hi,
Not sure if you are looking for client side handlebar js or server side handle bar integration.
Check below if helps
Handle bar & AEM server side integration
http://aempodcast.com/2015/javascript/server-side-handlebars-aem/#.W3XnmmaB1AY
조회 수
답글
좋아요 수
Hi Arun,
I want to render json response received from ajax using any templating language. I think we can't call sightly template from ajax success method and handlebar could come to rescue here. I want to pass json response to handlebar template and then render converted html on page.
Thanks,
Rajeev
조회 수
답글
좋아요 수
Below is the scenario..
$.ajax({
type: 'GET',
url: 'test.json',
data: { get_param: 'value' },
dataType: 'json',
success: function (data) {
//1. use any template to convert json response to html block
//2. Set the response on page(this can be done using jquery once html block is available from template.
});
}
});
조회 수
답글
좋아요 수
There are lots of libraries available like:
Displaying data from a flat JSON file on a Handlebars.js template file rendered with AJAX. · GitHub
AngularJS
VueJs (e.g.javascript - Fliter Json to HTML using Vue JS - Stack Overflow )
Unlike using libraries you can use do with jquery or javascript if structure is not complex and repetative.
조회 수
답글
좋아요 수
Thanks Arun.
I will prefer library so that JS & html are separated. Response data is complex and therefore having html template would be a better choice.
json2html seems to be too raw and basic api compared handlebar.
Thanks for the pointers. I will try to integrate handlebar using custom clientlib and see if I encounter any issues during this process.
Thanks,
Rajeev
조회 수
답글
좋아요 수
Arun,
Just last question - Can we levarage HTL template to render the json response from ajax?
조회 수
답글
좋아요 수