-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
1.template-helpers.js
Template7.registerHelper('steps', function(step1, step2) {
var str =
'<div class="steps">'+
'<div class="step1">' + step1 + '</div>' +
'<div class="step2">' + step2 + '</div>' +
'</div>';
return str;
});
module.exports = ['steps'];
-
.f7.html content is:
{{steps 'step1' 'step2'}}
-
webpack.config.dev.js
test: /\.f7.html$/,
use: [
'babel-loader',
{
loader: 'framework7-component-loader',
options: {
helpersPath: './src/js/template-helpers.js',
partialsPath: './src/template/',
partialsExt: '.f7p.html'
}
}
],
},
- Compile error :
ERROR in ./src/../aa.f7.html
Module build failed (from ./node_modules/framework7-component-loader/lib/index.js):
Error: Template7: Missing helper: "steps"
at Template7Class.compile (D:\luran\projects\xinge-pk-copy\bmanagersys\node_modules\template7\dist\template7.js:590:17)
at Function.compile (D:\luran\projects\xinge-pk-copy\bmanagersys\node_modules\template7\dist\template7.js:655:21)
at Object.loader (D:\luran\projects\xinge-pk-copy\bmanagersys\node_modules\framework7-component-loader\lib\index.js:161:43)
Metadata
Metadata
Assignees
Labels
No labels