Skip to content

Merging global format settings with pipe parameters cause errors in date pipe #496

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

Open
armanozak opened this issue Sep 3, 2021 · 0 comments

Comments

@armanozak
Copy link
Contributor

Current behavior

The global format settings are merged with the parameters passed to the pipe. This causes errors in the date pipe when dateStyle is set in the global config and you want to use options like year or month, and vice versa. Passing undefined for parameters set in global config is possible, but that is not a clean way.

Expected behavior

The pipe parameters to override the global format config, not be merged with it.

Minimal reproduction of the problem with instructions

Please check this StackBlitz playground. If you remove dateStyle: undefined and timeStyle: undefined, you will get an error.

Additional context

I understand that this may be a breaking change and require a major version release.

Contribution

I would like to make a pull request for this feature:
[x] Yes! 🚀
[ ] Maybe next time

@armanozak armanozak changed the title Bug: Merging global format settings with pipe parameters cause errors in date pipe Merging global format settings with pipe parameters cause errors in date pipe Sep 3, 2021
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

No branches or pull requests

1 participant