yireo-training/magento2-example-js-component3

Installs: 95

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:HTML

Type:magento2-module

0.0.1 2017-01-14 11:51 UTC

This package is auto-updated.

Last update: 2024-04-19 21:06:41 UTC


README

This repository contains a Magento 2 module that illustrates the usage of RequireJS and a simple JS component, that demonstrates how JS components can load their configuration.

Installation

To install use the following composer command:

composer require yireo-training/magento2-example-js-component3:dev-master

Next enable the module:

bin/magento module:enable Yireo_ExampleJsComponent3
bin/magento setup:upgrade

And flush the cache:

bin/magento cache:clean

Proof of concept

After installing the module, the main container should contain a box that is updated via the JS component, displaying the text from the Block class.

Optionally switch between the PHTML templates by modifying the Block class $_template variable.