Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Fixing issue #28 “回音” 问题 #36

Merged
merged 5 commits into from
Sep 23, 2017
Merged

Fixing issue #28 “回音” 问题 #36

merged 5 commits into from
Sep 23, 2017

Conversation

ztl8702
Copy link
Member

@ztl8702 ztl8702 commented Sep 3, 2017

增加一个“正在播放”的指示,并防止多次点击播放造成“回音”。

fireshot capture 3 - __ - http___localhost_3000_ idiom e4 b

不过现在有个问题:播放结束以后,图标不会跳回去,虽然显示图标所对应的$scope.isAudioPlaying已经改变(参见这里这里这里),但不会立刻反映到UI上。要触发页面其他地方改变,Angular才会重新渲染。有什么办法强制Angular重新渲染。

这个 PR 等到 #35 合并之后再合并

@ztl8702 ztl8702 requested a review from rovinglight September 3, 2017 17:07
@ztl8702 ztl8702 self-assigned this Sep 3, 2017
@ztl8702 ztl8702 added this to the v2.0 milestone Sep 3, 2017
@ztl8702
Copy link
Member Author

ztl8702 commented Sep 6, 2017

不能及时渲染的问题已解决: 因为变量改变是在外部event handler中发生的,所以要手动通知angular,加上$scope.$apply()后就解决了。

详见: http://jimhoskins.com/2012/12/17/angularjs-and-apply.html

@ztl8702 ztl8702 changed the base branch from radium/upgrade-angular to master September 23, 2017 07:30
@ztl8702 ztl8702 merged commit 1e75d40 into master Sep 23, 2017
@ztl8702 ztl8702 deleted the radium/issue-28 branch November 8, 2017 19:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant