2017-07-03 92 views
0

在我的離子應用程序中,我有一個功能,用戶應該在應用程序導航欄中看到水平點線,點擊它們,然後彈出菜單應該出現兩個菜單項(添加到收藏夾並添加評論)。下圖說明了我的觀點。看不到離子導航按鈕

app's image

的問題是,雖然這3個水平點不會出現在應用程序的導航欄。

這裏是ion-nav-button的代碼。

   <ion-view view-title="News Details"> 
       <ion-content> 
        <ion-nav-buttons side="secondary"> 
         <div class="buttons"> 
          <button class="button button-icon icon ion-more" 
            ng-click="openPopover($event)"></button> 
         </div> 
        </ion-nav-buttons> 
        <div class="card"> 
         <div class="item item-body item-text-wrap"> 
          <img class="full-image" ng-src="{{detailedNews.image}}" alt="Uthappizza"> 
          <h3>{{detailedNews.title}}</h3> 
          <p>{{detailedNews.description}}</p> 
         </div> 
        </div> 
        <div class="row"> 
         <div class="col col-offset-10"> 
           <h4>Customer Comments &nbsp;&nbsp;&nbsp; 
            <small>Sort by: &nbsp; 
             <input type="text" ng-model="orderText"> 
             </small></h4> 
           <ul class="list"> 
            <li ng-repeat="comment in dish.comments | orderBy:orderText"> 
             <blockquote> 
             <p>{{comment.rating}} Stars</p> 
             <p>{{comment.comment}}</p> 
             <footer>{{comment.author}}, {{comment.date | date:'MMM. dd, yyyy'}}</footer> 
             </blockquote> 
            </li> 
           </ul> 
         </div> 
      </div> 
      </ion-content> 
      </ion-view> 

也許這條線有什麼問題。

<button class="button button-icon icon ion-more"ng- 
click="openPopover($event)"></button> 

你能幫幫我嗎?

謝謝,

泰奧。

回答

1

嘗試在<ion-nav-bar></ion-nav-bar>指令中包裝<ion-nav-buttons></ion-nav-buttons>指令,並將其從ion-content中取出。

<ion-view view-title="News Details"> 
 
    <ion-nav-bar> 
 
     <ion-nav-buttons side="secondary"> 
 
      <div class="buttons"> 
 
       <button class="button button-icon icon ion-more" 
 
       ng-click="openPopover($event)"></button> 
 
      </div> 
 
     </ion-nav-buttons> 
 
    </ion-nav-bar> 
 
    <ion-content> 
 
    ...

+1

感謝,現在的工作:)。 – Theo