New version of controller using angular.controller