domatskiy / bitrix-angular
use angular bitrix
v1.0.5
2017-09-18 07:18 UTC
Requires
- php: >=5.6.4
Requires (Dev)
- phpunit/phpunit: ^5.4.0
This package is auto-updated.
Last update: 2025-03-18 04:08:45 UTC
README
install
composer require domatskiy/bitrix-angular
use
in php_interface/init.php
if(class_exists('\Domatskiy\Angular')) { $EventManager->addEventHandler("main", "OnEpilog", "OnEpilogHandler", true, 2); function OnEpilogHandler() { $angular = \Domatskiy\Angular::getInstance(); //$angular->setVendorJs(SITE_TEMPLATE_PATH."/js/angular.min.js"); // add in header vendor js $angular->setAppJs(SITE_TEMPLATE_PATH."/assets/app/app.min.js"); $angular->addModule('<module_name>', '<module_path>'); $angular->init(); } }
in component_epilog.php
if(class_exists('\Domatskiy\Angular')) { $angular = \Domatskiy\Angular::getInstance(); $angular->setAppJs(<path_template_js>); $angular->addModule('<module_name>', '<module_path>'); }