In Ionic application development there will be several instances where you wanna target browser and mobile device differently. By using below code you can check ionic platform.
// will execute when device is ready, or immediately if the device is already ready.
// Code need to run on Browser
// Code need to run on Mobile Device