The following code shows how to integrate the directive with the default options.
<html> <head> <link rel="stylesheet" href="../bins/lib/bootstrap/css/bootstrap.min.css"/> <script type="text/javascript" src="../bins/lib/angular/angular.min.js"></script> <script type="text/javascript" src="../bins/wl-ng-network-speed-tester.js"></script> </head> <body> <div ng-app="wl-ng-network-speed-tester" wl-ng-network-speed-tester></div> <script type="text/javascript"> //must set the bins url angular.module('wl-ng-network-speed-tester').value('bins', '../bins'); </script> </body> </html>
After browsing to our http;//the-server-root/javascript-network-speed-tester/sample/index.html, we should get something like:
WiseLoop JavaScript Network Speed Tester is an AngularJS module designed to offer a network bandwidth check against your internet server. Many server types are supported such as Apache HTTP, IIS, Node.js, nginx, Tomcat, Oracle HTTP, jetty and based on the download speed, it can also offer an estimation of internet cost that the user should pay for.