问题
I've a custom control in my app. it run as a web application fine. but when i'm running with sap fiori launchpad it give me error. I've registered my control in my index.html file
<script>
sap.ui.localResources("sap.custom");
sap.ui.localResources("sap.ui.codetools");
sap.ui.localResources("libs");
</script>
the structure of file directory is
If i remove my custom control then i can run my app in launchpad. Do I need to add some settings in my manifest file? What could be the reason for this error
回答1:
The common configuration for a Fiori tile is to point to the Component.js file. So the index.html is not called. The FioriLaunchpad.html plays the role of the index.html and the ComponentContainer is defined there. So register your path in the Component.js file.
init: function() {
//load CodeEditor
jQuery.sap.registerModulePath("sap.ui.codetools", "/sap/ui/codetools/");
UIComponent.prototype.init.apply(this, arguments);
// set the device model
this.setModel(models.createDeviceModel(), "device");
}
in this way you can fix your problem
回答2:
The common configuration for a Fiori tile is to point to the Compopent.js file. So the index.html is not called. The FioriLaunchpad.html plays the role of the index.html and the ComponentContainer is defined there.
Try to register your custom control somewhere else within the app.
来源:https://stackoverflow.com/questions/43558379/failed-to-load-ui5-component-with-properties-fiori-launchpad