Ionic InAppBrowser open ALL links inAppBrowser

From the documentation of InAppBrowser (

If you want all page loads in your app to go through the InAppBrowser, you can simply hook during initialization. For example:

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() { =;

How can i do this in ionic since the function open doesn't exist?
The urls i want to open are dynamic and comes from a server, so i don't know them in advance. 

You checked this?

Yes this is the plug in i use.

So, if I understand u correct, you want to “listen” smth that sends you the urls and then open them in the in app browser?

if yes, you would need an observer that listens to your server response.
then if the event get fired and you received an url, do it like the documentation:

if not, can you try to specify your problem a bit more?