Centralize legend getter in a service, compile suggestions HTML in search directive once only