Angular JS functionality.