You can create Require JS plugin in Magento with text! as a suffix and pass HTML file path in the dependency of the define( ) method in javascript.
An Example of a text plugin in Magento,
'text!Jesadiya_Blog/template/plugin.html'
You can create Require JS plugin in Magento with text! as a suffix and pass HTML file path in the dependency of the define( ) method in javascript.
An Example of a text plugin in Magento,
'text!Jesadiya_Blog/template/plugin.html'
Magento uses knockout Javascript to enhance some of its native features. You must have to know about the Knockout observable feature to use it.
knockout observables are used to get track changes of the current view model property. if you want to subscribe to a change of your view model objects, you must define your property or objects as observable.
A listens property of UI Component in Magento is used to track changes of a component’s property.
Any observable property changes happened, a function defined with listens property calls.
Let’s understand the listens:{} property with a simple example,