伊谢尔伦2017-05-15 17:13:07
作用就是告诉他的父级$scope,有事件触发啦,事件的名字叫做boyslist,然后数据是result.data
如果你的父$scope上有监听这个事件的话,就会触发里面的回调函数,例如
$scope.$on('boyslist', console.log);
这样就会打印出来
Scope Events Propagation
Scopes can propagate events in similar fashion to DOM events. The event can be broadcasted to the scope children or emitted to scope parents.
具体可以看这个,然后看Scope Events Propagation那一小块