Cordoba index.html from Express + Handlebars layout.hbs?

Using Handlebars with Express to insert .hbsfiles from /viewsinto a layout.hbs tag, {{{body}}} how can I convert this structure to use with Cordova, which is based on index.html?

+4
source share
1 answer

I am not familiar with the express, but the template aspect should be fairly simple with Cordoba and Pens. Christophe Coenraets has a tutorial on the basics of Cordoba, which also covers the use of Handlebars, which can be found here: https://ccoenraets.imtqy.com/cordova-tutorial/handlebars-templates.html

In particular, the call:

var homeTpl = Handlebars.compile($("#home-tpl").html());

, :

$('body').html(homeTpl());

body html .

, MarionetteJS MVC. , handlebars handlebars.compile(), html <body> index.html , .

0

Source: https://habr.com/ru/post/1627680/


All Articles