Hacker News Clone in AngularJS – Post 3, Part E: Using $location Service to Update Pagination Urls
Hi Everyone! I’m Dakota Lee Martinez. In this video series I’ll be using the Hacker News API to build out a Hacker News Clone in AngularJS.
These videos are accompanied by a series of blog posts at becomingaprogrammer.com. You can find the written explanation of the process and code samples there.
In this video we’ll be working on:
* Making sure that the url updates when we click on pagination links
To complete this task, we’ll need to complete the following tasks:
* Injecting $location as a dependency within our TopStoriesController
* Adding $location.url(‘top?page=’ + newPageNumber); to our updatePage function in the TopStoriesController