chore(): factor out some angular functions to variables