Create Custom Js Component – Magento2
3 years ago
To create a custom Js component we need to create the below file as per folder structure. first, we create our test-component.js(view/web/js/test-component.js) file, define([ 'jquery', 'uiComponent', 'ko' ], function ($, Component, ko) { 'use strict'; let testComponent = Component.extend({ self: this, defaults: { template: 'Mage2_CustomRouter/test' }, initialize: function () { let self = this; this._super(); […]

