Kum*_*nsh 6 ionic-framework ionic-native angular ionic4
我的 ionic 4 代码中有一个按钮和一个函数。理想情况下,单击按钮时,该功能应该启动,但事实并非如此。
我的 HTML
<ion-content padding>
<div class="contentFlow" id="profile-content">
    <h1>Profile</h1>
    <ion-button (click)="clicked()"  expand="block" color="light">
      Logout
    </ion-button>
  </div>
</ion-content>
我的技术:
clicked() {
    alert('hello');
  }
注意:我需要将 div 保留在我的代码中。
我应该怎么办?
它对我来说是这样的
html
      <div text-center>
        <ion-button (click)='bcWeek()' fill='clear' size='small' >
          <ion-icon name='arrow-dropleft' ></ion-icon>
        </ion-button>
        Some text
        <ion-button (click)='fwWeek()' fill='clear' size='small' >
          <ion-icon name='arrow-dropright' ></ion-icon>
        </ion-button>
      </div>
ts
  bcWeek() {
    console.log('back');
  }
  fwWeek() {
    console.log('fw');
  }
@库马尔·普里扬什
如果你发表评论
<div class="contentFlow" id="profile-content">
工作中?
| 归档时间: | 
 | 
| 查看次数: | 17078 次 | 
| 最近记录: |