2016-02-08 13 views
0

我需要打開一個模式,該模式顯示使用頁面之間轉換的tab風格的頁面。Modal中的製表符轉換(Ionic)

我無法瀏覽模態內的鏈接(不關閉模態)。我想在模式的選項卡之間創建一個類似標籤的轉換。

對於關閉模式的鏈接,我使用closeModal()。它適用於我的瀏覽器,但在設備上,它必須使用離子的原生一個href行爲,過度乘坐closeModal():

<a href="#/storeshop/{{stores[i].id}}" ng-click="closeModal()"> 

這裏

$ionicModal.fromTemplateUrl('app/components/stores/stores.html', { 
    scope: $scope, 
    animation: 'slide-in-up' 
}).then(function(modal) { 
    $scope.modal = modal; 
}); 

$scope.refineevent = function() { 
    $scope.modal.show(); 
}; 

$scope.closeModal = function() { 
    $scope.modal.hide(); 
};  

$scope.$on('modal.shown', function() { 
    console.log('Modal is shown!'); 
}); 

我的HTML:

<ion-modal-view> 
<ion-view name="stores"><ion-pane ng-controller="storesCtrl"> 

     <ion-content class="has-header"> 
    ... 
     </ion-content> 
    <div class="faketab"> 
    <table> 
     <tr> 
      <td><a href="stores">STORE DIRECTORY</a></td> 
      <td><a href="stylsts">STYLIST</a></td> 
     </tr> 
    </table> 
</div> 

</ion-view> 
</ion-modal-view> 

回答

0

您應該使用$state轉換到新狀態。

<a ng-click="goToStore(stores[i].id)"> 



    $scope.goToStore= function(storeId) 
    { 
     $scope.modal.hide(); 
     $state.go('tab.storeshop',{id:} 
    };