I'm attempting to access the barcode scanner plugin from within an ionic app within an iFrame within my main ionic app.
I'm doing this through trying to send a message to open the barcode scanner from within the iframe to the main app when a button is pressed and retuning the value scanned.
When using ionic run with my android device I get the message 'SecurityError: blocked a frame with origin **my server ip** from accessing a cross-origin frame.' this is because I call '$window.parent.angular.element($window.frameElement).scope()'
Any tips on getting around this? Could I use an ajax call instead to open the scanner plugin?
The cross origin blocked message is coming from ionic, I have to call $window.parent.angular.element($window.frameElement).scope() before I can use postMessage to set the scope, this is the point at which I get the error.