diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-15 03:00:53 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-15 03:00:53 +0200 |
commit | 3ce894af1e72c9488b8cb3340fd61656122f7d50 (patch) | |
tree | a603121e8b1e860201370399f8095121cd9c6bf7 /js/vendor/angular-ui/modules/directives/currency/README.md | |
parent | 10d76fff64363ea59d916b550854cf3540dadfbc (diff) |
use markdown, refactor js
Diffstat (limited to 'js/vendor/angular-ui/modules/directives/currency/README.md')
-rw-r--r-- | js/vendor/angular-ui/modules/directives/currency/README.md | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/js/vendor/angular-ui/modules/directives/currency/README.md b/js/vendor/angular-ui/modules/directives/currency/README.md deleted file mode 100644 index 7959201a5..000000000 --- a/js/vendor/angular-ui/modules/directives/currency/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# ui-currency directive - -This directive gives greater control over your currency elements by allowing you to set CSS styles based on the number's sign. -In angular, you are only able to specify what the currency symbol is (however, you might not want to change it for localization). - -## Usage - -Apply the directive to your html elements: - - myAppModule.controller('MyController', function($scope) { - $scope.SomeNumber = 123; - }); - - <span ui-currency ng-model="SomeNumber"></span> - -Default styles are in angular-ui.css and are pretty boring, you could just override these in your -stylesheet and make things most excellent (e.g. increasing size for negatives, doing a hover sorta thingy ) - - .ui-currency-pos { - color: green; - } - .ui-currency-neg { - color: red; - } - .ui-currency-zero { - color: blue; - } - .ui-currency-pos.ui-bignum, .ui-currency-neg.ui-smallnum { - font-size: 110%; - } - -### Options - -All the options can be controlled by ui.config (see Global Defaults) or passed in the ui-currency attribute on the declaration. -The symbol attribute defaults to null and is then controlled by the default locale settings. - - <span ui-currency="{ pos='pstyle' neg='nstyle' zero='zstyle' symbol='USD$' bignum='1000' smallnum='-1000'}" ng-model="SomeNumber" ></span> - -If the model is greater than or equal to 1000 add ui-bignum to css class, if less than or equal to -1000 add ui-small num. If attr is-total attribute -is set the bignum/smallnum is not applied. This is useful if the options are global and you don't want totals to necessarily have these classes. - -### Notes - -This directive wraps angular's currency filter. If that changes, you are on your own. - -
\ No newline at end of file |