Bandwidth calculator using AngularJS