How to show loading indicator after enter credentials in ios(In App purchase)?

I am making application using ionic framework with ios implementing In App purchase feature with cordova-plugin-purchase plugin.

followed tutorial: making-ios-app-purchases-ionicframework

i don’t know how to show indicator after entered apple credentials until last dialogue comes
already asked questioned: http://stackoverflow.com/questions/35175299/how-to-show-loading-indicator-after-enter-credentials-in-iosin-app-purchase
any help will be helpful ?