Using $on and $emit to create a loading message while data is being pulled and processed.