My Favorite VS Code Extensions (June 2016)

I’ve written a bit about my usage of Webstorm in the past, but I haven’t lately. There’s good reasoning behind it, I’ve switched to Visual Studio Code! I’ve really been enjoying using it, especially since I started working in Typescript. It seems like more and more people are enjoying it too! With that expanded audience, comes community written extensions for VS Code. These are my current favorite ones:

Do you have an extension that you love that you think I will too? Reach out to me on twitter and let me know! @AdamWeeks


Creating a Barcode Scanner with Ionic 2 in 15 Minutes

One of my most popular posts is Ionic Framework Introduction – Barcode Scanner. Apparently, people like making barcode scanners! Who knew!?!

Today, we’re going to do a little update to that post and get our Ionic 2 on! Since the previous app was so basic, I’m not going to actually upgrade the code, we’ll just start from scratch. Since we only have “15 Minutes” (YMMV) let’s get going! Continue reading

Angular Blackjack: Converting to Webpack

It has been a while since I’ve touched my Angular Blackjack project. When I first started working on it, I created a build process that used gulp-concat to simply merge all our application files into one. Let’s bring our application into 2015, ES2015 that is, with a modular loading system.

For this exercise I decided to use Webpack. I could’ve easily used jspm or browserify, but Kent C. Dodds‘s series on was easy to follow and very informative:

For a quick TL;DR, you can see the pull request of all the changes made:

Continue reading

Angular Directive Isolate Scope Binding with Parameters

(First off, sorry for the long winded post title. It is basically what I google every time I’m trying to remember the functionality.)

Let’s say you have a directive that allows a user to enter data. When that user is done entering data, the directive processes the data, then sends the result back up to the parent. If we were to do this with two-way data binding, we’d have to set up watchers to know when the values were changed. There is a way to do it without the watchers though. We can use the parent scope binding type: “&”.

Continue reading

Emoji Eater – An AngularJS Game for Ionic Framework

Emoji Eater

A few months ago I starting playing around with the idea of making a mobile game using Angular and Ionic. I didn’t want to use any game frameworks, just a basic game to play.

The game I ended up creating was Emoji Eater. It has gameplay that is very similar to the old Windows Mobile game called Jawbreaker. The only real difference is the “levels” where you have a certain amount of turns before the combination amount goes up. (I found it quite difficult to pass level 6!)

Now, I’m certainly no designer and definitely not a game designer, so please pardon the crudeness of the game. It is definitely not a “released” product, but it is playable.

If you’re interested in checking out the source behind it, I’ve posted it up on Github.


Angular Directive Unit Test Template for WebStorm

If you’ve seen any of my Angular code, you will notice that I use a LOT of element directives (Angular 2 calls these “components”!). You’ll also notice that I like writing a lot of unit tests.

After my previous post on WebStorm templates, I came to the realization that I was writing a lot of boiler plate code for testing these directives. Instead of rewriting these tests every time, I’ve created a template to use for unit testing directives.

(One thing to note, this requires at least angular mocks 1.3.15 for the bindings options in the $controller constructor)