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

bytes pipe doesn't convert correctly #527

Closed
ilsiepotamus opened this issue Apr 27, 2017 · 1 comment
Closed

bytes pipe doesn't convert correctly #527

ilsiepotamus opened this issue Apr 27, 2017 · 1 comment
Labels

Comments

@ilsiepotamus
Copy link
Contributor

Bug Report

The bytes pipe should be converting using powers of two (1024 for KB, 1,048,576 for MB, etc) not powers of 10.
{{ 1024 | bytes }} is returned as 1.02 KB

Screenshots or link to CodePen/Plunker/JSfiddle

screen shot 2017-04-27 at 3 35 19 pm
Plunker: http://plnkr.co/edit/gLMsYWq064zvaN9FOl32

What is the expected behavior?

pipe should divide by powers of two- {{ 1024 | bytes }} should equal 1 KB. 1 MB does not equal 1,000,000 bytes.

What is the motivation / use case for changing the behavior?

Conform with IEEE standards etc

Which version of Angular and Material, and which browser and OS does this issue affect?

All of them.
Did this work in previous versions of Angular / Material?
No.

@aciccarello
Copy link
Contributor

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

No branches or pull requests

3 participants