Home Hacker News Hacker News Clone in AngularJS – Post 4, Part B: Adding Story Info to Post Show Page

Hacker News Clone in AngularJS – Post 4, Part B: Adding Story Info to Post Show Page

5
0

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

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