SAPUI5: How to Get a Model in onInit in a Controller?

SAPUI5: How to Get a Model in onInit in a Controller?

This is about how to get a model in the onInit method of a controller in SAPUI5. The model can’t be acquired by this.getView().getModel() in the onInit method—the return value is undefined. But there is another way: learn here how to get the model in a controller’s onInit method. Let’s get started! Why Does this.getView().getModel() … Read more