0

I am working in Magento 2 static blocks. Inside the static block I want some content to be dynamic.

Is there any way to use knockout js in static block?

3

Yes. Knockout can be used inside Static Block. Insert the below code in a static block and save. On frontend page load you can see the text is updated using KO.

<div data-bind="text: 'Hello World'"></div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.