К сожалению, мои пользовательские компоненты JavaScript oro не загружаются
Мой reuiqrejs.yml здесь
Company / Bundle / BarcodeBundle / Resources / config / requirejs.yml
config:
paths:
'companybarcode/js/app/components/custom-component': 'bundles/companybarcode/js/app/components/custom-component.js'
Company / Bundle / BarcodeBundle / Resources / public / js / app / components / custom-component.js
мой custom-component.js выглядит следующим образом
define(function (require) {
'use strict';
var CustomComponent = BaseComponent.extend({
initialize: function (options) {
alert("Hello Component");
}
})
return CustomComponent;
});
мой взгляддля загрузки компонента
Company / Bundle / BarcodeBundle / Resources / views / Barcode / test.html.twig
<div data-page-component-module="companybarcode/js/app/components/custom-component"></div>
Я не знаю, что не так с кодом
Ссылка на Oro: https://oroinc.com/orocrm/doc/2.3/cookbook/how-to-replace-inline-javascript-with-component