ringtail / angular-ping

a implement of ping in javascript and angularjs
MIT License
5 stars 3 forks source link

angular-ping

a implement of ping in javascript and angularjs

Info

this is a very funny module , you can use command ping in angularjs

Install

    bower install angular-ping

How to use

you can use it like the code below:

   //first you should inject the dependencies
   myApp.module('app',['angular.ping']).controller('testController',['netTesting',function(netTesting){
        netTesting.ping('www.aliyun.com',function(){
           console.log(arguments);
        });

        netTesting.ping('192.168.0.1',function(){
            console.log(arguments);
        });
   }])

   //got the result
   ["www.aliyun.com","connected"]

   //get the result;
   ["192.168.0.1","disconnected"]

Have fun

Any question mail me.