In this example, a calculator is implemented as a Jaxon component, which is inserted at a given position in the page.
The result of the operation is computed by a service which is injected in the main component, and formatted by another component.
In this example, a calculator is implemented as a Jaxon component, which is inserted at a given position in the page.
The result of the operation is computed by a service which is injected in the main component, and formatted by another component.
<div <?= attr()->bind(rq(App\Calculator\Calc::class)) ?>>
<?= cl(App\Calculator\Calc::class)->html() ?>
</div>
<?php
$loader = new Keradus\Psr4Autoloader;
$loader->register();
// Register the namespace with a third-party autoloader
$loader->addNamespace('Service\\Calculator', ajaxDir('/calculator/lib'));
// Load the config
jaxon()->app()->setup(configFile('calculator.php'));