Implements angularJS routing for page generation.