Ionic typescript project with cordova plugins

Hi @richardshergold,

I managed to get it working in Ionic2 TS project as per my description above (create new starter project).

Interestingly, the plugin isnt reachable through cordova.InAppBrowser.open, but through window.open

The method doStuff() as per description which works for me:
doStuff() {

		// var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes'); <--- does not work
		console.log('Opening');
		var ref = window.open('http://apache.org', '_blank', 'location=yes');

		//console.log('Closing - how silly');
		//ref.close();  // uncomment to see the window opened and closed 

		// other methods:
		// ref.addEventListener( etc.. 
	}

So, I am not sure how to help further. Maybe try to setup yourself? I am using Ionic2 on Ubuntu.

Regards

Tom

1 Like