Replaced $rootScope.$emit with $rootScope.$broadcast

$emit launches the event to the parent scopes, but $rootScope is the parent scope of all scopes so to reach all children the event must be launched downwards, using $broadcast.