search

Home  >  Q&A  >  body text

angular.js - angular双向数据绑定问题?

console.log()打印playPauseIcon的值为 Object {pause: 1}
<button class="iconButton play" ng-click="onClickPlayPause()" ng-class="playPauseIcon" aria-label="Play/Pause"></button>
问题就在这 class里面的play应该为pause才对。多次点击就会出现这种情况。时好时坏的那种感觉,
双向绑定怎么会出现这种问题啊,很郁闷啊。
PHPzPHPz2744 days ago605

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-15 16:59:31

    The fields starting with

    aria are for assistive programs for people with disabilities. I didn’t see your onClick code or where the button text is assigned..

    reply
    0
  • Cancelreply