I've built express app with express-handlebars templating engine and it all works fine, but when I try to run that app in electron.io, I get only the content of the index.hbs file, which is }, as a responce. In other words: I don't get partials loaded as it should be. Here is the the code from electron file:
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
require('./express-app');
app.on('ready', function() {
var window = new BrowserWindow({minWidth: 1440, minHeight: 900});
window.loadURL('file://' + __dirname + '/express-app/views/index.hbs');
window.webContents.on('did-finish-load', function() {
window.show();
window.focus();
})
window.on('closed', function() {
window = null;
});
});
app.on('window-all-closed', function() {
app.quit()
})
What I would like to know is how to load partials instead of some text or HTML tags inside that } element.
via dlipovac012
No comments:
Post a Comment