A level meter AngularJS Directive.
It's reminiscent of an 80's tape deck's power level meters and is useful for simple dashboards.
This module can be installed using bower:
bower install boggin\angular-level-meter --save
Otherwise, simply add the angular-level-meter.min.js
file to your project.
Include the script in your application and include the angular-level-meter
module as a dependency in your application module.
angular.module('myApp', ['angular-level-meter']);
Add a level-meter
element to your application as required.
<level-meter level="{integer}"></level-meter>
The images are driven by the level attribute in the level-meter element. The level attribute is not currently watched.
This version has three visible results for integer values 1, 3, and 5. In other words, it groups (1, 2) and (3, 4).
If the level is zero or unrecognised then the bars are all empty.
TODO: currently there's a stylesheet, src/angular-level-meter.css, which needs integrating with the directive.
angular-level-meter is licensed under the MIT license. See LICENSE for details.