as part of my app i need to display an iframe as a page. i need to provide back and forward buttons on the page so that iframe can go back/ forward in its history.
when i try:
$scope.backiframe = function() {
var iframe = document.getElementById('iframe');
iframe.contentWindow.history.go(-1);
}
with my button and iframe:
<a class="button button-positive" ng-click="backiframe()">back</a>
<iframe id="iframe" ng-src="{{trustSrc(url)}}" scrolling="yes"></iframe>
i get the following error:
Error: Permission denied to access property "history"
$scope.backiframe@http://localhost:8100/js/controllers.js:1217:16
anonymous/fn@http://localhost:8100/lib/ionic/js/ionic.bundle...
does anyone know how to get iframe back/ forward to work in a phonegap ionic hybrid app?