Changed ctrl to controller as per angular recommendations.