Skip to content

Commit 6ee9308

Browse files
committed
Remove test code block
1 parent a83c617 commit 6ee9308

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

steps/32/README.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -69,37 +69,6 @@ export default class Detail extends Controller {
6969
};
7070
```
7171

72-
```js
73-
sap.ui.define(["sap/ui/core/UIComponent", "sap/ui/model/json/JSONModel"], function (UIComponent, JSONModel) {
74-
"use strict";
75-
76-
const Component = UIComponent.extend("ui5.walkthrough.Component", {
77-
metadata: {
78-
"interfaces": ["sap.ui.core.IAsyncContentCreation"],
79-
"manifest": "json"
80-
},
81-
init: function _init() {
82-
// call the init function of the parent
83-
UIComponent.prototype.init.call(this);
84-
85-
// set data model
86-
const data = {
87-
recipient: {
88-
name: "World"
89-
}
90-
};
91-
const model = new JSONModel(data);
92-
this.setModel(model);
93-
94-
// create the views based on the url/hash
95-
this.getRouter().initialize();
96-
}
97-
});
98-
;
99-
return Component;
100-
});
101-
```
102-
10372
This implementation is a bit better than the browser’s back button for our use case. The browser would simply go back one step in the history even though we were on another page outside of the app. In the app, we always want to go back to the overview page even if we came from another link or opened the detail page directly with a bookmark. You can try it by loading the detail page in a new tab directly and clicking on the back button in the app, it will still go back to the overview page.
10473

10574
***

0 commit comments

Comments
 (0)