angular controllers, first load, prepare and loop