add some error handling
add 'dontLeaveOnParamChanges' for '/view' and '/edit' route.