2015-10-13 126 views
0

我想設置一個應用程序與多個屏幕和一些屏幕應該有子屏幕。標籤工作正常,並與正確的模板連接,但子頁面不起作用。我甚至不能瀏覽到設置的網址。當我點擊圖標時,它會轉到默認情況下,我已在其他方法中設置。離子建立子頁面

APP JS文件

$stateProvider 

// setup an abstract state for the tabs directive 
.state('tab', { 
    url: '/tab', 
    abstract: true, 
    templateUrl: 'templates/tabs.html' 
}) 

// Each tab has its own nav history stack: 

.state('tab.home', { 
    url: '/home', 
     views: { 
     'tab-home': { 
     templateUrl: 'templates/tab-home.html', 
     controller: 'HomeCtrl' 
     } 
    } 
}) 

.state('tab.aboutApps', { 
    url: '/aboutApps', 
    views: { 
    'tab-aboutApps': { 
     templateUrl: 'templates/tab-aboutApps.html' 
    } 
    } 
}) 
.state('tab.aboutApps.pricing', { 
    url: '/aboutApps/pricing', 
    views: { 
    'detail-pricing': { 
     templateUrl: 'templates/detail-pricing.html' 
    } 
    } 
}) 
.state('tab.aboutApps.features', { 
    url: '/features', 
    views: { 
     'detail-features': { 
      templateUrl: 'templates/detail-features.html' 
     } 
    } 
}) 

HTML

<ion-item class="text-wrap" href="#/tab/aboutApps/features"> 
    <p>Features</p> 
    <ion-nav-view title="Features" name="detail-features" class="text-wrap"</ion-nav-view> 
</ion-item> 
<ion-item class="text-wrap" href="#/tab/aboutApps/pricing"> 
    <p>Pricing</p> 
    <ion-nav-view title="Pricing" name="detail-priceing" class="text-wrap"></ion-nav-view> 
</ion-item> 

我是新來的離子和不明白爲什麼這不會工作。我在想,有創造的路徑或URL

回答