ng-on-http-stable

1.1.0 • Public • Published

ng-on-http-stable

angular directive that renders when there are no $http outstanding requests

Purpose

This directive was created to delay the downloading of tracking scripts, it can, however, be used for any other purpose.

Usage

The directive should be placed in after the code which will be making the requests. Making it the last element in your page is always a good approach :).

directive

<ng-on-http-stable>
  <p>This will render when the $http service as no more pending calls</p>
</ng-on-http-stable>

service

A service is also available.

onHttpStableService.notifyWhenStable(function () {
    //execute logic
});

Package Sidebar

Install

npm i ng-on-http-stable

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • rjoaopereira