All Projects → salte-io → Ng Currency

salte-io / Ng Currency

Licence: mit
Currency with AngularJS made easy!

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ng Currency

Highcharts Ng
AngularJS directive for Highcharts
Stars: ✭ 1,741 (+1016.03%)
Mutual labels:  angularjs
Lowpolify
Create low-poly art from any image 🌟🌟
Stars: ✭ 149 (-4.49%)
Mutual labels:  angularjs
Dunglasangularcsrfbundle
Automatic CSRF protection for JavaScript apps using a Symfony API
Stars: ✭ 152 (-2.56%)
Mutual labels:  angularjs
Easymoney
Library for operating with monetary values in JavaScript and Typescript 💵
Stars: ✭ 145 (-7.05%)
Mutual labels:  currency
Angular Tree Dnd
Display tree table (or list) & event Drap & Drop (allow drag multi tree-table include all type: table, ol, ul) by AngularJS
Stars: ✭ 146 (-6.41%)
Mutual labels:  angularjs
Poddr
Podcatcher made with Electron and Angular
Stars: ✭ 149 (-4.49%)
Mutual labels:  angularjs
Meanshop
🛒 Building an e-commerce application with the MEAN stack
Stars: ✭ 140 (-10.26%)
Mutual labels:  angularjs
Serviceportal Widget Library
A collection of Service Portal custom widgets
Stars: ✭ 155 (-0.64%)
Mutual labels:  angularjs
Carrots Admin Ajax
基于AngularJS1.3.18 + BootStrap 3.3.7 + +jQuery3.2.1 的后台管理系统方案
Stars: ✭ 147 (-5.77%)
Mutual labels:  angularjs
Ngmeta
Dynamic meta tags in your AngularJS single page application
Stars: ✭ 152 (-2.56%)
Mutual labels:  angularjs
Musicplayer
A minimal music player built on electron.
Stars: ✭ 145 (-7.05%)
Mutual labels:  angularjs
Blur Admin
AngularJS Bootstrap Admin Panel Framework
Stars: ✭ 11,274 (+7126.92%)
Mutual labels:  angularjs
Angularjs Typescript Webpack
AngularJS 1.7, typescript 3 and webpack 4 starter project based on angular tutorial
Stars: ✭ 150 (-3.85%)
Mutual labels:  angularjs
Siberian
Siberian Single App Edition (SAE), free and open-source app builder.
Stars: ✭ 144 (-7.69%)
Mutual labels:  angularjs
Pagermon
Multimon-ng pager message parser and viewer
Stars: ✭ 154 (-1.28%)
Mutual labels:  angularjs
Jstag
Pure Angular Input Tags project
Stars: ✭ 140 (-10.26%)
Mutual labels:  angularjs
Track Ip
Advanced Ip Tracker Tool
Stars: ✭ 150 (-3.85%)
Mutual labels:  currency
Angular Promise Buttons
Chilled loading buttons for AngularJS
Stars: ✭ 156 (+0%)
Mutual labels:  angularjs
Angular Bootstrap Checkbox
A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design
Stars: ✭ 154 (-1.28%)
Mutual labels:  angularjs
Mean Blog
Blog using Nodejs, Expressjs, Angularjs and Mongodb. MEAN Javascript Fullstack application
Stars: ✭ 151 (-3.21%)
Mutual labels:  angularjs

ng-currency

NPM Version NPM Downloads Travis Coveralls

semantic-release Greenkeeper badge

ng-currency has officially entered maintenance mode.

Install

You can install this package either with npm or with bower.

npm

$ npm install ng-currency

Then add a <script> to your index.html:

<script src="/node_modules/ng-currency/dist/ng-currency.js"></script>

Or require('ng-currency') from your code.

bower

$ bower install salte-io/ng-currency

Then add a <script> to your index.html:

<script src="/bower_components/ng-currency/dist/ng-currency.js"></script>

Example

See it in action!

ES6 Usage

app.module.js

import angular from 'angular';
import ngCurrency from 'ng-currency';

angular.module('my-app', [
  ngCurrency // 'ng-currency'
]);

inside your angular app

<input type="text" model="yourModel" ng-currency />

ES5 Usage

index.html

<!DOCTYPE html>
<html>
  <head>
    <script src="/node_modules/angular/dist/angular.min.js"></script>
    <script src="/node_modules/ng-currency/dist/ng-currency.min.js"></script>
    <script>
      var app = angular.module('my-app', [
        'ng-currency'
      ]);

      app.controller('MainCtrl', function($scope) {
        $scope.value = 123456.78;
      });
    </script>
  </head>
  <body ng-app="my-app" ng-controller="MainCtrl">
    <input type="text" ng-model="value" ng-currency>
  </body>
</html>

Bindings

min / max

Default: undefined

Description: Specifies the range the ng-model value can be within for validation and hard-cap

<input type="text" model="yourModel" ng-currency min="1" max="1337" />
  • If you want to be able to dynamically enable/disable validations from a controller you can use the following
<input type="text" model="yourModel" ng-currency min="1" max="1337" ng-required="true" />

currency-symbol

Default: Locale Currency Symbol

Description: Prefixes the formatted currency value with the currency symbol.

<input type="text" model="yourModel" ng-currency currency-symbol="¥" />

Active (ng-currency)

Default: true

Description: Dynamically disable / enable ng-currency.

<input type="text" model="yourModel" ng-currency={{isCurrency}} currency-symbol="¥" />

fraction

Default: 2

Description: Determines the number of decimal places.

<input type="text" ng-currency min="0" fraction="0" />

hard-cap

Default: false

Description: Forces the ng-model value to stay within the min / max range.

<input type="text" ng-currency min="0" hard-cap="true" />
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].