2017-07-03 94 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