adds demonstration on $on, $emit and $broadcast