Set the value of a global variable in a function
问题 I'm currently working on an SAP Fiori app that consumes an OData service. I created a method in my controller fonct that calculates a variable coming from my OData. I want to capture this value and put it in a global variable every time the view is refreshed. I created a global variable like this: var boo1; return Controller.extend("com.controller.Detail", {...}); and I passed boo1 as a parameter in my method fonct inside my onInit method but it is undefined . Here's a snippet of my