我创建了一个包含SideNavigation的视图。为此,我需要包含sap.tnt包。在index.html
我初始化了这样的应用程序:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<link href="./resources/css/dashboard.css" rel="stylesheet">
<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons, sap.tnt, sap.viz"
data-sap-ui-theme="sap_goldreflection">
</script>
<!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
<script>
sap.ui.localResources("dashboard");
var view = sap.ui.view({id:"idHome1", viewName:"dashboard.Home", type:sap.ui.core.mvc.ViewType.JS});
view.placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
但我仍然遇到这个错误:
sap-ui-core.js: GET http://localhost:8080/Dashboard_PROTOTYP/resources/sap/tnt/library-preload.json 404 (Not Found)
sap-ui-core.js: 2016-05-30 09:53:13.899110 failed to preload 'sap.tnt.library-preload': Not Found - sap.ui.ModuleSystem
sap-ui-core.js:71 GET http://localhost:8080/Dashboard_PROTOTYP/resources/sap/tnt/library.js 404 (Not Found)
ncaught Error: failed to load 'sap/tnt/library.js' from resources/sap/tnt/library.js: 404 - Not Found
sap-ui-core.js:152 Uncaught TypeError: Cannot read property 'SideNavigation' of undefined
我不知道该怎么做,因为我已经把图书馆包括在内了......任何人都有想法吗?