extracted page logic out into angular
 Please enter the commit message for your changes. Lines starting