format-as-currency

WebJar for format-as-currency

Лицензия

Лицензия

Категории

Категории

ORM Данные
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

format-as-currency
Последняя версия

Последняя версия

3.1.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

format-as-currency
WebJar for format-as-currency
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/bcherny/format-as-currency

Скачать format-as-currency

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/format-as-currency/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>format-as-currency</artifactId>
    <version>3.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/format-as-currency/
implementation 'org.webjars.bower:format-as-currency:3.1.3'
// https://jarcasting.com/artifacts/org.webjars.bower/format-as-currency/
implementation ("org.webjars.bower:format-as-currency:3.1.3")
'org.webjars.bower:format-as-currency:jar:3.1.3'
<dependency org="org.webjars.bower" name="format-as-currency" rev="3.1.3">
  <artifact name="format-as-currency" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='format-as-currency', version='3.1.3')
)
libraryDependencies += "org.webjars.bower" % "format-as-currency" % "3.1.3"
[org.webjars.bower/format-as-currency "3.1.3"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.bower : angular jar [1.3,)

Модули Проекта

Данный проект не имеет модулей.

format-as-currency

Build Status Coverage Status npm cc0

Angular directive to format an input as a currency as the user types. Like autoNumeric for Angular.

Demo

http://bcherny.github.io/format-as-currency/demo

Installation

Install via bower or NPM:

  • Bower: bower install --save format-as-currency
  • NPM: npm install --save format-as-currency

Usage

<div ng-controller="myController">
  <input
    format-as-currency
    ng-model="value"
    type="text"
  >
</div>

<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/format-as-currency/format-as-currency.js"></script>
<script>
  angular
  .module('myModule', [
    'bcherny/formatAsCurrency'
  ])
  .controller('myController', function ($scope) {
    $scope.value = '' // currency input value
  })
</script>

With a custom currency symbol

<input
  format-as-currency
  currency-filter="'yuan'"
  ng-model="value"
  type="text"
>
<script>
  angular
  ...
  .filter('yuan', function ($filter) {
    return function (value) {
      return $filter('currency')(value, '¥')
    }
  })
</script>

With a custom currency formatter

<input
  format-as-currency
  currency-filter="'myFilter'"
  ng-model="value"
  type="text"
>
<script>
  angular
  ...
  .filter('myFilter', function () {
    return function (value) {
      return '¥' + value
    }
  })
</script>

With a module loader

Browserify

var formatAsCurrency = require('format-as-currency')
angular.module('myModule', [formatAsCurrency])

Rollup

import * as formatAsCurrency from 'format-as-currency'
angular.module('myModule', [formatAsCurrency])

Webpack

var formatAsCurrency = require('format-as-currency/src/format-as-currency')
angular.module('myModule', [formatAsCurrency])

Running the tests

npm test

Contributing

Contributions are welcome! Please be sure to:

  • File an issue for the problem that your PR addresses
  • Test your fix thoroughly
  • Follow the existing code style
  • Add unit tests to cover your feature, or to prevent future regressions

Версии библиотеки

Версия
3.1.3