Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(input): register builtin parsers/formatters before anyone else #9358

Closed
wants to merge 1 commit into from

Conversation

tbosch
Copy link
Contributor

@tbosch tbosch commented Oct 1, 2014

Previously, builtin parsers/formatters for e.g. input[date]
or input[number] were added in the post linking phase to ngModelController,
which in most cases was after a custom formatter/parser was registered.

This commit registers builtin parsers/formatters already
in the pre linking phase. With that builtin
parsers run first, and builtin formatters run last.

Closes #9218

@tbosch
Copy link
Contributor Author

tbosch commented Oct 1, 2014

@IgorMinar Could you review this?

@tbosch tbosch self-assigned this Oct 1, 2014
@tbosch tbosch added this to the 1.3.0-rc.4 milestone Oct 1, 2014
@Narretz
Copy link
Contributor

Narretz commented Oct 1, 2014

Looks good, but I don't really like the test format. It's unintuitive that the "it"'s don't have an "expect".

@tbosch tbosch force-pushed the fix/formatterorder branch from 20e79db to aab0b08 Compare October 1, 2014 22:51
tbosch added a commit to tbosch/angular.js that referenced this pull request Oct 1, 2014
Previously, builtin parsers/formatters for e.g. `input[date]`
or `input[number]` were added in the post linking phase to `ngModelController`,
which in most cases was after a custom formatter/parser was registered.

This commit registers builtin parsers/formatters already
in the pre linking phase. With that builtin 
parsers run first, and builtin formatters run last.

Closes angular#9218
Closes angular#9358
@tbosch
Copy link
Contributor Author

tbosch commented Oct 1, 2014

Thanks @Narretz, made the tests more readable.
@jeffbcross Could you double check and merge this?

@jeffbcross
Copy link
Contributor

@tbosch yep

Previously, builtin parsers/formatters for e.g. `input[date]`
or `input[number]` were added in the post linking phase to `ngModelController`,
which in most cases was after a custom formatter/parser was registered.

This commit registers builtin parsers/formatters already
in the pre linking phase. With that builtin
parsers run first, and builtin formatters run last.

Closes angular#9218
Closes angular#9358
@tbosch tbosch force-pushed the fix/formatterorder branch from aab0b08 to 7ad2234 Compare October 1, 2014 23:08
@tbosch tbosch closed this Oct 2, 2014
@tbosch tbosch deleted the fix/formatterorder branch October 2, 2014 00:38
tbosch added a commit that referenced this pull request Oct 2, 2014
Previously, builtin parsers/formatters for e.g. `input[date]`
or `input[number]` were added in the post linking phase to `ngModelController`,
which in most cases was after a custom formatter/parser was registered.

This commit registers builtin parsers/formatters already
in the pre linking phase. With that builtin
parsers run first, and builtin formatters run last.

Closes #9218
Closes #9358
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document $formatters v.1.2.0 -> v.1.3.0: type of value parameter is now a string, not the bound model type
4 participants