The logic of the traveldiary should be put outside the view with a controller (written in angularJS).