I have developed separate ionic application that should work with Moodle. That application needs to get data from few tables of Moodle database. In the application I want to add "Login to the Moodle" step first and then application should able to get data form Moodle.
How I implement "Log in to the Moodle" step?
How I get data form the Moodle database ?
You may be interested to know that the moodle mobile 2 app was created using the ionic framework and is open source, available at https://github.com/moodlehq/moodlemobile2 for you to look through or even to be used as a basis for your app.
I'd recommend reading up on web services, they are the primary way to retrieve information from moodle. https://docs.moodle.org/dev/Creating_a_web_service_client