JSFiddle - React, Tailwind, and code Playground
by agraebe
HTML
<body id="content" class="sapUiBody"></body>
JavaScript
var orgData = new sap.ui.model.json.JSONModel("http://api.github.com/orgs/SAP");
var repoData = new sap.ui.model.json.JSONModel("http://api.github.com/orgs/SAP/repos");
sap.ui.getCore().setModel(repoData, "repos");
sap.ui.getCore().setModel(orgData, "org");
var list = new sap.m.List();
list.bindItems({
path: "repos>/", template : new sap.m.StandardListItem({ title: "{repos>name}" })
});
var page2 = new sap.m.Page("page2", {
content: list,
title: "Repositories",
showNavButton: true,
navButtonTap: function(){
app.back();
}
});
var page1 = new sap.m.Page("page1", { title: "OpenUI5 Sample",
content: [
new sap.m.Button({
icon: "{org>/avatar_url}",
text: "GitHub",
press: function() {
app.to("page2");
}
})
]
});
var app = new sap.m.App().addPage(page1).addPage(page2).placeAt("content");