Begin Angular JS hooks