You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My goal is to work with a custom element. because I also use a gettext-extractor that queries for a selector (ex. <translate>mytranslation</translate>) You can't query with the gettext-extractor handlebar code like this {{#translate}}Tree{{/translate}} in your template.
I created a helper and have this code so far. And when I have a element <foo>test</foo>
It should work, but it does not.
Does anyone have a idea to make this work?
Thanks in advanced!
`import Handlebars from "handlebars";
require("handlebars.element").default(Handlebars);
export default function helpersHandlebarsdcTranslate(options) {
Handlebars.registerElement("foo", function(attributes) {
var div = document.createElement("div");
div.innerText = "Hi There " + (attributes.title ? attributes.title : "guest");
Hello, I have succesfully implemented the handlebars-loader in webpack. Great work btw! 👍
For the translations in handlebar I need this plugin https://www.npmjs.com/package/handlebars.element
My goal is to work with a custom element. because I also use a gettext-extractor that queries for a selector (ex.
<translate>mytranslation</translate>)
You can't query with the gettext-extractor handlebar code like this{{#translate}}Tree{{/translate}}
in your template.I created a helper and have this code so far. And when I have a element
<foo>test</foo>
It should work, but it does not.
Does anyone have a idea to make this work?
Thanks in advanced!
`import Handlebars from "handlebars";
require("handlebars.element").default(Handlebars);
export default function helpersHandlebarsdcTranslate(options) {
Handlebars.registerElement("foo", function(attributes) {
var div = document.createElement("div");
div.innerText = "Hi There " + (attributes.title ? attributes.title : "guest");
}`
The text was updated successfully, but these errors were encountered: