Setting up a JavaScript project in 2017

Creating a front-end JavaScript project can be a daunting task due to the sheer volume of choices available while deciding the tech stack. First, you need to decide the JavaScript framework or library for your project. Do you plan to use the latest ES2015 language features in your code? If yes, then you need a transpiler because your browser probably doesn’t support them yet. Then you require a bundling tool to get your code loaded in the browser. [Read More]

Closures in JavaScript

A good understanding of closures is a must-have skill for any JavaScript programmer. So let’s take a look at how they work with two simple examples. In JavaScript, functions are first class citizens. This means a function can be passed as an argument to another function, returned as the value from a function, assigned to a variable and stored in a data structure. We can even write a function within a function, and the inner function has access to the environment within which it was created. [Read More]

Dependency Injection in AngularJS 1.x

AngularJS Dependency Injection works like magic! You pass a service name in your controller constructor function and angular runtime promptly provides you with a suitable object. While this makes development process easier, it might be a little disconcerting if you don’t know what’s happening behind the scene. In this article, I will take a look at how angular DI works. In an Angular application, user can create different kinds of components like: directives, controllers, services etc. [Read More]