refactor text_angular_diary.js