Building a Hacker News Clone in AngularJS Part 4 – Angular Filters

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.

Building a Hacker News Clone in AngularJS Part 4 – Angular Filters

This video covers the following topics:

* injecting the $stateParams object into the StoryController
* accessing the id of the story through the url using $stateParams.id
* adding ID: {{ vm.id }} to the story-comments.html view
* visiting http://localhost:8080/#/post?id=1 to check that the id is being transferred from the URL into the view
* adding story directive to the story-comments.html view and passing id=”vm.id” to it.
* visiting http://localhost:8080/#/post?id=1 to make sure that the story directive is working within the story-comments.html view

source