Refatorando action AngularJS do controller Home.