angularjs - InnapBrowser in Ionic not working -
i using inappbrowser plugin open site pages in application. problem when touch item, inappbrowser no return, or adb error logs, while in web browser, testing ionic serve, works ... here code:
html:
<ion-item ng-repeat="item in posts | filter: query" class="item-thumbnail-left item-text-wrap item-icon-right item-noticia" ng-click="urlchange('{{item.permalink}}')"> <img class="thumb-noticia" data-ng-src="{{item.thumbnail}}"> <h2> {{item.title}} </h2> <p>{{item.excerpt | limitto: 100}}...</p> <ion-option-button class="button-dark button-facebook" ng-click="shareanywhere()"> <i class="icon ion-social-facebook icon-facebook"></i> </ion-option-button> <ion-option-button class="button-dark button-whatsapp" ng-click="shareanywhere()"> <i class="icon ion-social-whatsapp-outline"></i> </ion-option-button> </ion-item>
angularjs:
$scope.urlchange = function(url){ window.open(url, '_blank', 'hidden=no'); }
anyway, again, decided problem myself...
the result:
in command line:
ionic plugin add cordova-plugin-inappbrowser
angularjs:
$scope.urlchange = function($url, $rootscope){ cordova.inappbrowser.open($url, "_blank", "location=no", "clearcache: no", "toolbar: no"); }
html:
<ion-item ng-repeat="item in posts | filter: query" class="item-thumbnail-left item-text-wrap item-icon-right item-noticia" ng-click="urlchange('{{item.permalink}}')">
Comments
Post a Comment