Hacker News Clone in AngularJS – Post 2, Part B: Using ngPluralize for NumComments
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.
This video covers the following topics:
* Utilizing the ‘descendants’ property from the Hacker News API
* Replacing the getNumComments function by accessing the ‘descendants’ property
* Using ngPluralize within the story directive template so we can display ‘discuss’ if there are no comments, ‘1 comment’ if there is 1 comment, and ‘x’ comments if there are x comments.
This video was recorded after the series was recorded, so this correction may or may not appear in future videos. It is, however, recommended to make the change now if you are following along.