Table of Contents
2. webapp/controller/App.controller.js
我们把UI封装到组件component 中,这样组件可以实现独立和可重用
文件结构
1.webapp/Component.js (New)
Component.js file in the webapp folder that will hold our application setup. The init function of the component is automatically invoked by SAPUI5 when the component is instantiated. Our component inherits from the base classsap.ui.core.UIComponent and it is obligatory to make the super call to the init function of the base class in the overridden init method.(感觉英文比中文翻译更好理解一些)
sap.ui.define([
"sap/ui/core/UIComponent"
], function (UIComponent) {
"use strict";
return UIComponent.extend("", {
init : function () {
// call the init function of the parent