Day 60 Reddit Clone Connections

Day 60 is in the books! Today was awesome. I felt the momentum pick up significantly as far as my overall understanding of Angular. I got into a flow today and was able to make significant progress on the Reddit clone.

Sharing is Caring

My first task of the day was to figure out a way to pass data from one controller to another. I thought I was going to have to use a service, but I found an “easier” way. I learned that you can pass parameters in the form of an object whenever you reference another state by way of the ui-sref angular tag. These parameters are then available to you in other controllers as long as you inject $stateParams. The specific thing that I needed to pass along was the id of the specific post that I was referencing so that I could display just that post on an edit page (see below):

Reddit Clone Edit Post View

Once I had access to the id in my edit component I just used $http to make a get request to the database to grab the info for that post. I then rendered that post to the view along with an edit form. Notice that since I queried the database to get that specific posts information the edit form is preloaded with all of the existing values for that post. This allows the user to change only the properties that they want without having to retype everything.

I also added functionality for adding comments to the database and deleting comments and posts from the database. I still need to tweak a few things, but overall I’m happy with the progress I was able to make today. I have a few more small deliverable tomorrow and then I should be able to submit the app. I’m looking forward to being able to make a nice walkthrough of everything after I’m done.

Job Search

I started to officially start my job search as of this past weekend. I have a little over 2 months left in the program, but I also know that the job search will take some time so I decided to get started. I spent a significant amount of time improving my resume and online profiles this weekend. I’m also cleaning up a few of my projects so that they are a little more presentable. I’m excited to see what opportunities may be out there. I’m also nervous about how the interview process will go since this will be my first venture into the grueling technical interviews that this industry has to offer. Wish me luck on that! I’ll keep you guys posted on everything as things unfold. Until next time…happy coding!

60 down 40 to go