Skip to content

An Angular.js module that pings a specified URL or IP using an HTTP GET request.

License

Notifications You must be signed in to change notification settings

AntonAI/Angular.js-Ping-Service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Angular.js Ping Service

An Angular.js module that pings a specified URL or IP using an HTTP GET request.

Installation

  • Copy pingService.js to your project's JavaScript directory.
  • Add a dependency for the 'pingService' module to your app.
  • Inject the 'ping' service into your controller(s).

Usage

From your controller(s):

ping.ping(testURL, function(response) {
  if (response > 0) {
    // Ping successful
  } else {
    // Ping failed
  }
});

If ping was successful, callback will return the time it took to reach the testURL in seconds (ex. 3.24). If ping failed, callback will return 0.

About

An Angular.js module that pings a specified URL or IP using an HTTP GET request.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published