I'm trying to refactor the legacy UI5-codebase and would like to use reusable dialogs.
My steps:
- I've downloaded the Walkthrough Step 19: Reuse Dialogs sample
- I've added
HelloDialog.jsinto project's./controller/folder - I've added
HelloDialog.fragment.xmlinto project's./view/folder - I've adjusted a namespace inside of
HelloDialog.jsandHelloDialog.fragment.xmlfromsap.ui.demo.walkthrough.controller.HelloDialogtowebapp.controller.HelloDialog - I've added a button for the
HelloDialogto the view:
<Button id = "helloDialogButton"
icon = "sap-icon://world"
text = "Show Popup"
press = ".onOpenDialog" />
- I've added to
App.controller.js:
onOpenDialog() {
this.getOwnerComponent().openHelloDialog();
},
- I've added
"./controller/HelloDialog"toComponent.jsand initialize the object:
init(...args) {
UIComponent.prototype.init.apply(this, args);
this.getRouter().initialize();
this._helloDialog = new HelloDialog(this.getRootControl());
}
- I've added hooks to the
exitandopenHelloDialogevents toComponent.js:
exit() {
this._helloDialog.destroy();
delete this._helloDialog;
},
openHelloDialog() {
this._helloDialog.open();
},
Now, I run the project and get the a blank page, in DevTools console I see the following error:
Failed to load component for container
rootComponentContainer. Reason: TypeError:HelloDialogis not a constructor

The only difference I can spot is that I'm using arrow functions in my code, but can it be that arrow functions break UI5? Perhaps, some issues with the object context.