Skip to content

Added leading zero & restrict EAC#55

Closed
frontshift wants to merge 5 commits intosiddii:masterfrom
frontshift:master
Closed

Added leading zero & restrict EAC#55
frontshift wants to merge 5 commits intosiddii:masterfrom
frontshift:master

Conversation

@frontshift
Copy link
Copy Markdown
Contributor

Added an option leading zero to timer. This is handy if you want to use the timer as a countdown clock. If the number is <10 it will add a leading zero to it.

I created separate scope variables for the format (ddays, mminutes, sseconds)

<div data-timer end-time="1400799600000" add-leading-zero>{{ddays}}:{{hhours}}:{{mminutes}}:{{sseconds}}</div>

Updated docs.

I also set restrict to EAC because you should be able to use elements as well as attributes and classes in your markup,

frontshift and others added 4 commits March 17, 2014 21:06
Added an optional feature that adds a leading zero to a number if it is
smaller than 10. Updated docs as well.
You should be able to use elements as well as attributes and classes in
your HTML markup
updated the code to use separate scope variables
@siddii
Copy link
Copy Markdown
Owner

siddii commented Mar 18, 2014

I am trying to cut down an extra if check. How about removing add-leading-zero attribute directive & do this by default?
Can you please add some E2E test for this?

@siddii
Copy link
Copy Markdown
Owner

siddii commented Mar 18, 2014

Sorry the more I think about this, the more I am getting confused with options. Would adding a format-precision attribute would suffice in this case? Like for example would add 2 numeric precision to scope values.

The flip side is, we cannot mix & match the precisions like for days you may not need 2 number precisions but for others you may need etc.
Let me know your thoughts.

@frontshift
Copy link
Copy Markdown
Contributor Author

Well logically it would only make sense to have more than 2 precisions for days, although I don't really see any use case for this at the moment...

@frontshift frontshift closed this Mar 18, 2014
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