简体   繁体   English

看不到离子导航按钮

[英]Can't see the ion-nav-button

In my ionic app,I have a feature where the user should see in app's nav bar horizontal dot lines,click on them and then a pop up menu should appear with two menu items(add to favorites and add a comment). 在我的离子应用程序中,我具有一个功能,用户应在应用程序的导航栏中看到水平点线,单击它们,然后将出现一个弹出菜单,其中包含两个菜单项(添加到收藏夹并添加评论)。 The below picture illustrates my point. 下图说明了我的观点。

应用程式的图片

The problem though is that those 3 horizontal dots don't appear in the nav bar of the app. 但是,问题在于,这3个水平点没有出现在应用程序的导航栏中。

Here is the code for the ion-nav-button. 这是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>

Maybe there is something wrong in this line. 也许这行有问题。

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

Can you help me? 你能帮助我吗?

Thanks, 谢谢,

Theo. 西奥

Try wrapping the <ion-nav-buttons></ion-nav-buttons> directive inside an <ion-nav-bar></ion-nav-bar> directive and taking it out of ion-content . 尝试将<ion-nav-buttons></ion-nav-buttons>指令包装在<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> ... 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM