Home Hacker News Hacker News Clone in AngularJS – Post 3, Part E: Using $location Service to Update Pagination Urls

Hacker News Clone in AngularJS – Post 3, Part E: Using $location Service to Update Pagination Urls

10
0

Building a Hacker News Clone in AngularJS – Part 3

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.

http://becomingaprogrammer.com/tutorial/hacker-news-clone-angularjs-pagination-part-3/

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

source

LEAVE YOUR COMMENT

Your email address will not be published. Required fields are marked *

WordPress Anti Spam by WP-SpamShield

Close

Powered by moviekillers.com