Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-odometer-js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-odometer-js

Angular.JS wrapper for Hubspot Odometer

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
Maintainers
1
Weekly downloads
 
Created
Source

Bower version NPM version

Build Status Code Climate angular-odometer

Angular.JS directive for Hubspot angular-odometer.

Copyright (C) 2014, Sebastian Wallin sebastian.wallin@gmail.com

Requirements

Install with Bower

bower install angular-odometer-js

Install with NPM

npm install angular-odometer-js

Usage

Include angular-odometer.js in your application, as well as the odometer.js and the default theme CSS file

<script src="components/odometer/md5.js"></script>
<script src="components/angular-odometer/build/angular-odometer.js"></script>

<link rel="stylesheet" href="components/odometer/themes/odometer-theme-minimal.css"/>

Add the module ui.odometer as a dependency to your app:

var app = angular.module('app', ['ui.odometer']);

Then use the directive on a tag of choice tag and it will convert it to a odometer for you. Examples:

<span odometer="'5'">

<span odometer="visitors">

<span odometer="visitors" odometer-options="{theme: 'digital', duration: 3000}">

Configuration

The options that are sent along to Odometer can be set either directly in the directive as seen above with odometer-options hash or configured as default parameters via the odometerOptionsProvider:

angular.module('ui.odometer').config([
  'odometerOptionsProvider', function(odometerOptionsProvider) {
    odometerOptionsProvider.defaults = {
      duration : 3000,
      theme    : 'digital'
    };
  }
]);

All the available options can be seen over at the Odometer docs

License

MIT

FAQs

Package last updated on 04 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc