[英]Fiori launchpad fails to load UI5 app because it cannot find registered custom module
I've a custom control in my app.我的应用程序中有一个自定义控件。 It runs as a standalone web application fine.它可以作为独立的 Web 应用程序运行。 But when I'm launching it from the Fiori Launchpad (FLP), it logs an error in the console.但是当我从 Fiori Launchpad (FLP) 启动它时,它会在控制台中记录一个错误。 I've registered my control in my index.html
file:我已经在我的index.html
文件中注册了我的控件:
<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 the launchpad.如果我删除我的自定义控件,那么我可以在启动板中运行我的应用程序。 Do I need to add some settings in my manifest file?我需要在清单文件中添加一些设置吗? What could be the reason for this error?此错误的原因可能是什么?
The common configuration for a Fiori tile is to point to the Component file. Fiori tile 的常见配置是指向组件文件。 So the index.html
file is not deployed together with the app.因此index.html
文件不会与应用程序一起部署。 If it's absolutely necessary to register additional module paths, do it in manifest.json
instead.如果绝对有必要注册其他模块路径,请改为在manifest.json
。
{
"sap.ui5": {
"resourceRoots": {
"sap.ui.codetools": "sap/ui/codetools"
}
}
}
Documentation: Descriptor for Applications, Components, and Libraries (See resourceRoots
).文档: 应用程序、组件和库的描述符(请参阅resourceRoots
)。
The common configuration for a Fiori tile is to point to the Compopent.js file. Fiori tile 的常见配置是指向 Compopent.js 文件。 So the index.html is not called.所以 index.html 没有被调用。 The FioriLaunchpad.html plays the role of the index.html and the ComponentContainer is defined there. FioriLaunchpad.html 扮演 index.html 的角色,ComponentContainer 在那里定义。
Try to register your custom control somewhere else within the app.尝试在应用程序内的其他地方注册您的自定义控件。
激活SICF上的APP节点(节点名称与App相同)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.