Subscribe

Archive | Javascript

Flattening Promise Chains

Promises are a great solution to address complexities of asynchronous requests and responses. AngularJS provides Promises using services such as $q and $http; other services also use promises, but I will not discuss those here. Promises allow developers to easily attach 1x-only notifications of response to any asynchronous request/action. Promises also enable two (2) other […]

Enhancing AngularJS Logging using Decorators

AngularJS Logging with Color and $Log

Let’s explore how to use Decorators to enhance AngularJS logging and supercharge the $log service. AngularJS has a great hidden feature $provider.decorator() that allows developers to intercept services and substitute, monitor, or modify features of those intercepted services. The decorator feature is not deliberately hidden… rather it is masked by so many other great AngularJS […]