Reputation: 512
window open is not working in ionic for ios application.
My code is :
var ref = $window.open(url, '_system', 'location=no,toolbar=yes');
Controller:
app.controller('myController',function($http,$scope,$state,$ionicLoading,$cordovaOauth,$ionicPopup,$window,$ionicHistory,$cordovaCamera,$ionicPlatform,$timeout,$cordovaInAppBrowser,$rootScope,$cordovaDevice,Notification)
Upvotes: 0
Views: 3628
Reputation: 1131
You need to add Cordova Inappbrowser in order to use it.
var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
or
window.open('http://apache.org','_system','location=no');
Make sure to check deviceready state
or (for ionic) $ionicPlatform.ready
before using it.
Upvotes: 4