search

Home  >  Q&A  >  body text

angular.js - angular ionic 的label标签里面为什么不能放button按钮?

<label class="item item-input">
    <button class="button smsbutton" ng-click="getPhoneSms()" ng-show="getSms">获取验证码</button>
</label>

这样的button 的ng-click事件失效

天蓬老师天蓬老师2744 days ago540

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2017-05-15 17:00:05

    ng-click fails, you need to check if there is something wrong with your controller. Is the above code in the controller? The failure of ng-click() has nothing to do with whether it is placed in LABEL

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-15 17:00:05

    Post the controller code and take a look

    reply
    0
  • Cancelreply