首页 文章

看不到离子导航按钮

提问于
浏览
0

在我的离子应用程序中,我有一个功能,用户应该在应用程序的导航栏中看到水平点线,单击它们然后弹出菜单应该出现两个菜单项(添加到收藏夹并添加注释) . 下图说明了我的观点 .

app's image

问题是这3个水平点不会出现在应用程序的导航栏中 .

这是离子导航按钮的代码 .

<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 回答

  • 1

    尝试将 <ion-nav-buttons></ion-nav-buttons> 指令包装在 <ion-nav-bar></ion-nav-bar> 指令中并将其从 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>
        ...
    

相关问题