Refactor AngularJS: historial.html