Quantcast
Channel: Todd Motto
Browsing all 21 articles
Browse latest View live

Polyfills suck, use a featurefill instead

I’m going to dub this a featurefill as the post title suggests, but it’s more a feature-detect-closure-binding-smart-polyfill-api-checker-reusable-function-awesomeness.So, what’s the deal?… I’m a huge...

View Article



AngularJS one-time binding syntax

Angular 1.3 shipped with an awesome new performance enhancing feature - one-time binding. What does this mean for us Angular developers and the performance of our apps? A lot! For us developers,...

View Article

ES6 arrow functions, syntax and lexical scoping

ES6/Harmony/whatever introduces a really nice feature that punches above it’s weight in terms of simplicity to integrate versus time saving and feature output. This feature is the arrow function.Before...

View Article

Killing it with Angular Directives; Structure and MVVM

In this post I’m going to outline my approach on writing Directives for Angular 1.x releases. There’s a lot of confusion around how and why and where to do things with Directives, but they are actually...

View Article

A better way to $scope, angular.extend, no more “vm =...

The evolution of Angular Controllers has changed over the last year. As of now, most of us are working with the most recent addition to “Controller” syntax with the controllerAs style (doing away with...

View Article


Image may be NSFW.
Clik here to view.

Being a healthy software engineer

A post a little off topic today, but after a few tweets of mine a few people have suggested a write up on what changes I’ve made and how they’ve affected me.From the top, a little less than a year ago...

View Article

No $scope soup, bindToController in AngularJS

Namespacing, code consistency and proper design patterns really matter in software engineering, and Angular addresses a lot of issues we face as front-end engineers really nicely.I’d like to show you...

View Article

Moving from ngModel.$parsers/ng-if to ngModel.$validators/ngMessages

Implementing custom Model validation is typically done by extending the built-in $error Object bound to AngularJS form models, such as a simple <input>. Prior to Angular 1.3, custom validation...

View Article


Superfast Angular: use ngModelOptions to limit $digest cycles

The $digest cycle is the critical entity for keeping our Angular applications fast: the faster the cycle, the faster the two-way data binding. JavaScript has a single thread of execution, which means...

View Article


Walkthrough to upgrade an Angular 1.x component to Angular 2

In this article we’re going to look at upgrading your first Angular 1.x component, a simple todo app, across to Angular 2 code. We’ll compare the API differences, templating syntaxes and hopefully...

View Article

Exploring the Angular 1.5 .component() method

Angular 1.5 is set to introduce the .component() helper method, which is much simpler than the .directive() definition and advocates best practices and common default behaviours. Using .component()...

View Article

NGRX Store: Understanding State Selectors

Selectors are pure functions that take slices of state as arguments and return some state data that we can pass to our components. To better understand what selectors are and what they do, it helps see...

View Article

Classes vs Interfaces in TypeScript

Classes and interfaces are powerful structures that facilitate not just object-oriented programming but also type-checking in TypeScript. A class is a blueprint from which we can create objects that...

View Article


Introduction to TypeScript

Since its inception, JavaScript has experienced monumental growth - especially in recent years.The language has expanded its application domain far beyond the browser. It is now used to power backends,...

View Article

Angular's NgIf, Else, Then - Explained

Using the ngIf directive allows us to simply toggle content based on a conditional. But is it as simple as we think? Not quite, the directive has a heap of helpful syntaxes that can help us deal with...

View Article


Handling Observables with NgIf and the Async Pipe

Dealing with async operations with the async pipe takes care of subscribing to Observable streams/async stuff like Promises for us.There are a few common gotchas when dealing with purely cold...

View Article

Step by Step Custom Pipes in Angular

Angular has many Pipes built-in, but they only take us so far. Ideally we’d like to extend our applications by creating custom Pipes.Custom Pipes (previously Filters in AngularJS) allow us to...

View Article


Image may be NSFW.
Clik here to view.

Typing Arrays in TypeScript

There are many ways we can type a property to declare to TypeScript something is an array, or contains an array of “something”. We have generic types, array types and type assertions.For the purposes...

View Article

Angular Classes with NgClass

With Angular, we have many approaches to adding, removing, toggling classes. We can choose single classes and bind a property, or we can use the awesome NgClass directive from Angular.In this post,...

View Article

Testing Actions in NGRX Store

In this small NGRX Store testing series, we’re going to learn how to test Actions, Reducers and Selectors. Let’s begin with Actions, or more specifically Action Creators and how to test them.Table of...

View Article
Browsing all 21 articles
Browse latest View live




Latest Images