$ $发出广播同步或异步的? [英] $emit $broadcast synchronous or asynchronous?
本文介绍了$ $发出广播同步或异步的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是 $范围。$放出()
和 $范围。$广播()
同步或异步字面意义?
Are $scope.$emit()
and $scope.$broadcast()
synchronous or asynchronous in the literal sense?
例如,在例
$scope.$emit()
console.log(" I am finished sending events");
和
$scope.$broadcast()
console.log(" I am finished sending events");
如果所有的听众都是同步的(没有Ajax调用等)会毕竟侦听器接收它们的事件日志记录才会发生?
If all the listeners are synchronous (have no ajax calls etc) will the logging only happen after all listeners receive their events?
推荐答案
他们是同步的。
又见<一个href=\"https://groups.google.com/d/msg/angular/yyH3FYAy5ZY/APANNMnolD8J\">https://groups.google.com/d/msg/angular/yyH3FYAy5ZY/APANNMnolD8J
这篇关于$ $发出广播同步或异步的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文