Joshua Colvin

Popular Tags all tags

Creating Angular Component Styling Hooks with CSS Custom Properties

28 March, 2022

When creating Angular components for others to use someone will inevitably request the ability to customize styles that are not supported…

Understanding Angular ::ng-deep

19 March, 2022

The CSS selector is often used in an Angular Component’s CSS to override the styles of a third-party component or a child component’s…

How to Prevent Safari from Treating Numbers as Phone Numbers

20 September, 2021

Safari on IOS has a handy feature that will automatically detect phone numbers and turn them into clickable links. Your site may contain…

How to get all checked checkbox values using JavaScript

13 September, 2021

Retrieving the values from a collection of checkboxes is not as straightforward as you would expect. In this article, I will show you one…

How to Conditionally Add Attributes in Angular

06 September, 2021

There are often times in Angular when you want to add an HTML attribute to an element but only if some condition is . In this post, I will…

Building a Pagination Component in Angular

30 August, 2021

A pagination component can be used to paginate a list of items. In this article, we will code a pagination component in Angular…

How to Check Which Versions of Node Angular CLI Supports

08 September, 2020

I recently ran into an issue with Angular CLI version 10.1.0. Anytime I ran I would get this error: After a lot of trial and error I…

How to Set Up Git hooks with husky and lint-staged

04 September, 2020

Git hooks allow you to trigger actions at certain points in git’s execution. They are integral in keeping a codebase clean since we can do…

Subscribing to route params and route data in Angular

30 August, 2020

There are times when you need to subscribe to both params and data in a component. In this article, I will show you how I accomplished this…

Mocking Route params in Angular unit tests

29 September, 2019

Mocking activated route snapshot params It’s common, in Angular, to access route parameters when the component is initialized. This can be…

Handling Errors in Angular Resolvers

12 February, 2019

In a previous post, we looked at creating a Resolver. The resolver will route the user if the data “resolves” but not if an error occurs and…

Creating a Route Resolver in Angular

29 January, 2019

Angular Resolvers allow us to get data before the user is navigated to a route. If we have a route that displays a list of products there…

Adding dynamic validators in Angular

29 October, 2018

Adding dynamic validators to an Angular form control is not as straight forward as one would expect. We’ll explore some problems you may…

Why choose Angular?

23 October, 2018

There are plenty of think pieces that compare JavaScript frameworks and tell you why all of them are inferior to the authors chosen one…

Resources for learning Angular

18 December, 2017

Learning a new framework can be a daunting task. One thing that makes this task even more difficult is deciding which resources are worth…

Thoughts on two years of software development

27 August, 2017

Without realizing it, I’ve just surpassed two years working professionally as a software developer. Over the course of that two years I have…

Simple Mock REST API's with JSON-Server

28 February, 2017

One of the biggest pain points I’ve experienced as a front end developer is writing an application that consumes a REST API before the REST…

Build a REST API with Hapi and MongoDB

21 February, 2017

In a previous post we looked at getting started with hapi. If you’re brand new to hapi I suggest you read that post first since it goes into…

Getting started with Hapi

27 January, 2017

There are many choices when it comes to Node frameworks: express, koa, and sails just to name a few. In this tutorial we’ll take a look at…

Understanding JavaScript: Closures

14 September, 2016

Closure’s in JavaScript might seem like a difficult thing to grok but when you strip away the mystery they are really rather simple: What is…

Understanding JavaScript: Hoisting

05 September, 2016

To understand hoisting you must first understand how scope works in JavaScript. In JavaScript, hoisting occurs when variable or function…

Understanding JavaScript: Scope

29 August, 2016

Scope is an important concept to understand in JavaScript since it is the foundation that many other concepts are built upon. In this post…

Understanding JavaScript: this

28 February, 2016

One of my goals for 2016 is to really understand the JavaScript language and understanding the keyword was the first step. I chose because…

Writing better JavaScript: Coding Exercises

18 January, 2016

I have a confession to make: I’m a bad developer and I’m ok with that. I often write way more lines of code than necessary to solve a…

Writing maintainable CSS

05 June, 2015

I’ve been thinking and reading a lot lately about different CSS architecture methodologies. I’m somewhat ashamed to admit that my approach…

Setting up a site with Jekyll

17 November, 2014

What is Jekyll? Jekyll is a simple, blog-aware, static site generator. I first heard about Jekyll through a css-tricks screencast. I had…