We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2498fd3 commit 24e6a13Copy full SHA for 24e6a13
webapp/controller/Home.controller.js
@@ -1,7 +1,18 @@
1
sap.ui.define([
2
- "com/mrb/UI5-Data-Binding/controller/BaseController"
3
-], function(Controller) {
+ "com/mrb/UI5-Data-Binding/controller/BaseController",
+ "sap/ui/model/json/JSONModel"
4
+], function(BaseController, JSONModel) {
5
"use strict";
6
- return Controller.extend("com.mrb.UI5-Data-Binding.controller.Home", {});
7
+ return BaseController.extend("com.mrb.UI5-Data-Binding.controller.Home", {
8
+ onInit: function(){
9
+
10
+ var oModel = new JSONModel({
11
+ greetingText: "Hi, my name is Marco"
12
+ });
13
14
+ //Set model globally for all Views/Controls (Dirty)
15
+ sap.ui.getCore().setModel(oModel);
16
+ }
17
18
});
0 commit comments