index.js 第 9 步的 openUI5 中缺少文件:组件配置

index.js file missing in openUI5 from Step 9: Component Configuration

我正在使用 openUI5 文档学习 openui5(版本 1.61.1)

从版本 1.61.1 开始,openUI5 包括 index.js file.This index.js 从 "step:9 Component configuration " 到最后一步的文档中缺少文件。如果没有 index.js 我无法继续进行 file.I 我不确定我是否遗漏了任何一点或与文档错误相关的内容。

我找到问题了。在第 9 步中,我们必须包含以下元数据标记并更改 index.html 文件中的 onInit 值。

<meta name="viewport" content="width=device-width, initial-scale=1.0">
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"

但是我不确定如果我们添加这个元数据标签为什么它会起作用。谁能给我解释一下。

I have found the issue. in step no 9 we have to include the below meta data tag and change onInit value in index.html file.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"

我在教程的第 9 步中遇到了同样的问题。除了建议的更改之外,我还必须更改 index.html 的正文以显示我的视图内容。

我的工作 index.html 看起来像这样:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Chatter UI</title>
    <script
            id="sap-ui-bootstrap"
            src="http://127.0.0.1:8080/openui5-demo/resources/sap-ui-core.js"
            data-sap-ui-theme="sap_belize"
            data-sap-ui-libs="sap.m"
            data-sap-ui-compatVersion="edge"
            data-sap-ui-async="true"
            data-sap-ui-resourceroots='{
                "sap.ui.demo.walkthrough": "./"
            }'
            data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
    >
    </script>
</head>
<body class="sapUiBody" id="content">
    <div data-sap-ui-component data-name="sap.ui.demo.walkthrough" data-id="container"></div>
</body>
</html>