| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
An AngularJS directive for displaying a circular progress meter.
This module can be installed using bower:
bower install angular-progress-arc --saveOtherwise, simply add the angular-progress-arc.min.js file to your project.
Include the script in your application and include the angular-progress-arc module as a dependency in your application module.
angular.module('myApp', ['angular-progress-arc']);Add a progress-arc element to your application as required.
<progress-arc
size="{integer}"
stroke="{string}"
stroke-width="{integer}"
complete="{expression}"
counter-clockwise="{string}"
background="{string}">
</progress-arc>As well as using attributes of the directive element, a progress arc can be styled using CSS.
// Use a more complex selector in your application to avoid styling other SVG elements.
circle {
stroke: rgba(0, 0, 0, 0.1);
stroke-linecap: round;
}The stroke-dashoffset property is used to render the position of the progress arc, so adding a transition for this property will result in smoother transitions between progress values.
circle {
transition: stroke-dashoffset 0.1s linear;
}If you use CSS for styling, avoid setting the following properties that are used to calculate the progress arc position:
This module provides a service for configuring application-wide defaults for progress-arc directives. To change default values, inject the progressArcDefaultsProvider into your module's config method:
myApp.config(['progressArcDefaultsProvider', function (progressArcDefaultsProvider) {
progressArcDefaultsProvider
.setDefault('background', '#aaa')
.setDefault('size', 300);
});The values you can configure this way are size, strokeWidth, stroke and background.
angular-progress-arc is licensed under the MIT license. See LICENSE for details.
| Back | FazBrowse Home | New Git URL |