Angular Promise Tracker

screenshot of Angular Promise Tracker
angular

Easily add spinners or general request tracking to your angular app

Overview

Angular Promise Tracker is a lightweight library designed to enhance Angular applications by providing easy management of promise tracking. The library allows developers to incorporate loading spinners or status updates while waiting for HTTP requests to resolve. With its recent version upgrade (2.0), users transitioning from version 1.x will need to be aware of the breaking changes outlined in the CHANGELOG. This adds an additional layer of importance for those looking to upgrade their experience seamlessly.

The core functionality revolves around the promiseTracker service, which manages the active state of promises, allowing developers to control when UI indicators should be displayed. This feature becomes particularly useful in scenarios where HTTP calls could return rapidly, and developers want to refine the user experience by avoiding flickers.

Features

  • Activation Delay: Specify a delay in milliseconds before the tracker activates, useful for controlling spinner visibility based on response times.

  • Minimum Duration: Set a minimum time that the loading spinner remains visible, thereby creating a smoother user interface even for quick responses.

  • Global Tracking: Easily implement a global promise tracker by attaching it to $rootScope, great for displaying overarching loading screens across your application.

  • Active State Check: Utilize tracker.active() to check if any promises are pending, allowing dynamic UI updates based on asynchronous operations.

  • Tracking Status: The tracker.tracking() function lets you know if any promises are currently being monitored, enhancing the ability to manage various UI states.

  • Promise Addition: Use tracker.addPromise(promise) to seamlessly integrate promises into the tracker, simplifying the process of managing multiple asynchronous calls.

  • Deferred Object Creation: Quickly create a new tracked promise with tracker.createPromise(), streamlining promise management within your application logic.

  • Cancellation Method: The tracker.cancel() function allows developers to halt tracking immediately, providing flexibility in managing state and UI responsiveness.

angular
Angular

Angular is a TypeScript-based open-source framework by Google for building dynamic single-page applications and cross-platform mobile apps with MVC architecture and a rich set of features.

grunt
Grunt

Grunt is a popular JavaScript task runner that automates repetitive tasks like minification, compilation, and testing, allowing developers to focus on writing code.