Use the following code to call an OData service :-
var modelo =new sap.ui.model.odata.v2.ODataModel("proxy/http/services.odata.org/V2/OData/OData.svc/");
This is the standard way in SAPUI5 to call an model. You can use AJAX also, but the sap.ui.model class makes it easier to work with the OData service.
Hope this helps,
Hello,
Use a JSONModel :)
I mean, instead of using $.ajax call, use loadData from JSONModel, you will see it is easier ;)
Add comment