Hi Nidhi,
You should not modify the component.js file if you would like to use an odata web service.
Read the following post for learning how to use mock data, and how to use an odata web service.
How to embed mock data in a SAPUI5 mobile application
Best Regards,
Emanuel