sapui5 - Not able to initilize the JS view in openui5 -
not able initilize below js view in index page. please me? m getting error msg "uncaught (in promise) typeerror: t.createcontent not function"
plunker link: https://plnkr.co/edit/7v0cn93adraoy9wqu269?p=preview
app.view.js:
sap.ui.jsview("app",{ getcontrollername:function(){ return "app"; }, createcontent:function(ocontoller){ var obutton = new sap.m.button(this.createid("hellobutton"),{ text:"click me" }); return obutton; } });
change view code this
sap.ui.jsview("view.js.app", { getcontrollername: function() { return "view.js.app"; }, createcontent: function(ocontoller) { var obutton = new sap.m.button(this.createid("hellobutton"), { text: "click me" }); return obutton; } });
also add controller file app.controller.js , paste below code.
sap.ui.controller("view.js.app", { oninit: function() { } });
Comments
Post a Comment