using angularJS to work with a Single page application