<div class="list">
<a class="item item-avatar" href="#" ng-click="loadData()" onclick="window.open('http://www.mysite', '_blank', 'location=yes'); return false; ">
<img src="img/be1.png">
<h2>site here</h2>
</a>
</div>
和我的控制器
.controller('MyCtrl', function($scope, $ionicLoading, $timeout) {
$scope.myTitle = 'Loading Sample';
$scope.loadingIndicator;
$scope.counter = 0;
$scope.loadData = function() {
$scope.loadingIndicator = $ionicLoading.show({
template: '<ion-spinner icon="spiral"></ion-spinner>'
});
$timeout(function() {
$ionicLoading.hide();
}, 1500);
};
})
感谢
答案 0 :(得分:-3)
在loadData()中添加
var ref = window.open('http://www.mysite','_ blank','location = no');
(location = no隐藏网址栏)
ref.addEventListener('loadstart',function(){$ ionicLoading.show()}); ref.addEventListener('loadstop',function(){$ ionicLoading.hide()});