Articles and Lessons tagged with Angular - Page 5

Logging HTTP Errors in Angular 6

Logging HTTP Errors in Angular 6

Posted Aug 26, 2018 | | By Maina Wycliffe | Angular
In my last post, I looked at how you can use HTTP Interceptors to attach and refresh authorization tokens. In this post, we are going to use the same HTTP Interceptor to catch HTTP errors – 500, 401, 400 etc. – and logging them remotely. It is …
Read More

Refreshing Authorization Tokens – Angular 6

Refreshing Authorization Tokens – Angular 6

Posted Aug 22, 2018 | | By Maina Wycliffe | Angular
In this post, we are going to build a http interceptor for refreshing authorization tokens once expired. The idea here is to be able to intercept http requests, attach an authorization header to the request. And to intercept http response, check for …
Read More

Getting Started with Debugging Angular Apps in VSCode

Getting Started with Debugging Angular Apps in VSCode

Posted Aug 20, 2018 | | By Maina Wycliffe | Angular
In this post, I am going to show you how to get started with debugging angular apps in VSCode. We shall target Firefox, Chrome and Microsoft Edge. VSCode Debugger provide important features that can improve your development experience. These features …
Read More

Angular Material Autocomplete with HTTP Lookup

Angular Material Autocomplete with HTTP Lookup

Posted Aug 15, 2018 | | By Maina Wycliffe | Angular
In this demo, we will build an angular autocomplete component that gets autocomplete suggestions from a http service such as a REST API. The idea here is that, instead of using a static autocomplete list, we are going to pull autocomplete suggestions …
Read More

Lazy Loading Images in Angular 6

Lazy Loading Images in Angular 6

Posted Aug 13, 2018 | | By Maina Wycliffe | Angular
In most web apps, images form a huge chunk of the size of the content. If you had, let’s say over 50 images with each having 100Kbs (after compression and resizing) in size, the total of that would be 100 x 50 which is 5MBs in total size. While …
Read More

Options for Deploying Angular Apps

Options for Deploying Angular Apps

Posted Aug 10, 2018 | | By Maina Wycliffe | Angular
We all develop application so that other people can use them, it’s not different for Angular apps. In this post, I will focus on options for deploying angular apps. This guide is applicable to almost all JavaScript Frameworks – with a few …
Read More

How to Build a Custom Form Control in Angular

How to Build a Custom Form Control in Angular

Posted Aug 10, 2018 | | By Maina Wycliffe | Angular
As a developer, sometimes you are required to take some inputs from a form control and do some preprocessing before submitting – commonly on the submit function. A good example of this is a phone number, where you take a country code and phone number …
Read More

Angular Reactive Forms – Building Custom Validators

Angular Reactive Forms – Building Custom Validators

Posted Aug 8, 2018 | | By Maina Wycliffe | Angular
Angular has built-in input validators for common input validation such as checking min and max length, email etc. These built-in validators can only take you so far, at some point you might need to build a custom validator. In this post, I will show …
Read More

SVG/Webfont Icon Packs for your Angular App

SVG/Webfont Icon Packs for your Angular App

Posted Aug 6, 2018 | | By Maina Wycliffe | Angular
If you are looking to improve your web app both visually and functionally, icons are a very good place to start. Icons if applied correctly, are easily recognized by users and therefore can substitute long text. This enables developers to utilize the …
Read More

Lazy Loading Scripts and Styles in Angular

Lazy Loading Scripts and Styles in Angular

Posted Aug 4, 2018 | | By Maina Wycliffe | Angular
In my earlier post, I covered about lazy loading of angular modules. In this post, I will cover lazy loading of scripts and styles, both external and local. The goal of this post is to show how you can defer loading of a script or style and load it …
Read More

Working with Environment Variables in Angular 6

Working with Environment Variables in Angular 6

Posted Aug 2, 2018 | | By Maina Wycliffe | Angular
It’s common for developers to have multiple application versions that target different environments i.e. development and production. It’s common that each environment will have some unique environment variables i.e. API Endpoint, app version etc. …
Read More

Top VSCode Extensions for Angular Developers

Top VSCode Extensions for Angular Developers

Posted Jul 30, 2018 | | By Maina Wycliffe | Angular
Since the release of VSCode a few years ago, it has become very popular among developers. VSCode is my favorite text editor and use it every day for almost all my projects. The only exception are projects related to Machine Learning where Notebook …
Read More