stage | start-date | release-date | release-versions | teams | prs | project-link | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
recommended |
2020-12-22 00:00:00 UTC |
2021-03-22 00:00:00 UTC |
|
|
|
The {{attrs}}
object in templates is an alternative way for users to reference
named arguments directly in a template.
It was a legacy API that existed prior to named arguments being introduced in Ember, and has continued to be supported via a template transform for some time. This RFC proposes that we deprecate this functionality in favor of directly using named arguments.
The {{attrs}}
syntax was from a previous iteration of the concepts that
eventually became named argument syntax. Now that named arguments exist in the
framework, and are considered the best practice, there is no reason to continue
supporting this syntax.
Users who currently rely on referencing {{attrs}}
can convert their references
to named arguments. This should be highly codemoddable, and we will attempt to
make a codemod to help out with the transition.
The {{attrs}}
object was an alternative way to reference named arguments in
templates that was introduced prior to named arguments syntax being finalized.
References to properties on {{attrs}}
can be converted directly to named
argument syntax.
Before:
After:
- None