Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added separator, decimal, useGrouping and useEasing options support #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

fxckdead
Copy link
Contributor

@fxckdead fxckdead commented Apr 9, 2017

Use it like other options:

data-separator="." data-decimal="," data-use-grouping="false" data-use-easing="false"

I put the "boolean conversion" in directive attrs, but i know it can be done in directive scope like:

scope: {
   ngModel: '=',
   useGrouping: '='
},

and use it like:

if (scope.useGrouping != null) {
   opts.useGrouping = scope.useGrouping;
}

But idk what is the best option in this case or its only a matters of tastes.

PD: Idk why this pull requests sends the last commit that was merged?

…: 'data-separator="." data-decimal="," data-use-grouping="false" data-use-easing="false"'
@andrewboni
Copy link
Owner

LGTM, but can you resolve the merge conflicts?

… support: 'data-separator="." data-decimal="," data-use-grouping="false" data-use-easing="false"'"

This reverts commit 6df60f4.
@fxckdead
Copy link
Contributor Author

@andrewboni i just "fixed" the merge conflicts, the thing was that my fork wasn't sync to your repo, so i was behind a commit.

PS: I forgot to build dist in the commit, so did another commit 😢

if attrs.decimal?
opts.decimal = attrs.decimal;
if attrs.useGrouping?
opts.useGrouping = if attrs.useGrouping == 'true' then true else false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just do opts.useGrouping = if attrs.useGrouping == 'true'

if attrs.useGrouping?
opts.useGrouping = if attrs.useGrouping == 'true' then true else false
if attrs.useEasing?
opts.useEasing = if attrs.useEasing == 'true' then true else false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as previous comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, i don't use CoffeScript so i'm learning with this module 😄 , i must modify this pull then?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants