Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: Where to put reusable functions?

$
0
0

Hi Ben,

 

Its preferable to define all the applications wide function's as a common utility function's rather leaking in the global scope.

 

window.App = {

                    Models : {},

                    Views : {},

                    Controllers : {},

                    Utilities : {}

};

 

App.Utilities.myFunc = function () {

     //do something

};

 

Regards,

Ajain


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>