question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate `bind-`, `bindon-`, `on-`, and `ref-` syntax in templates

See original GitHub issue

Which @angular/* package(s) are relevant/releated to the feature request?

compiler, core

Description

These template syntaxes are rarely used and unnecessarily expand the API surface of our template language. This issue is for tracking the deprecation of bind-, bindon-, on-, and ref-.

Proposed solution

Deprecate bind-, bindon-, on-, and ref- in v14 and create a migration for when they are removed.

Alternatives considered

N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
atscottcommented, Oct 1, 2021

This would leave only the syntactic sugar behind, right?

That’s right

How about bind-animate?

Syntactic sugar HTML-like [property]="value" bind-property="value" [(property)]="value" bindon-property="value" (event)="eventHandler($event)" on-event="eventHandler($event)" #variable ref-variable [@trigger]="value" bind-animate-trigger="value"

Good catch! I totally missed that one.

1reaction
LayZeeDKcommented, Oct 2, 2021

That’s a good one, @flash-me 😊 In light of that, the template syntax planned for deprecation might be a familiar looking data binding syntax for Vue and Aurelia developers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecated APIs and features - Angular
The template prefixes bind- , on- , bindon- , and ref- have been deprecated in v13. Templates should use the more widely documented...
Read more >
Template syntax reference - Lit.dev
lit-html templates are written using JavaScript template literals tagged with the html tag. ... Each binding type supports different types of values:.
Read more >
Template Syntax | AngularDart Community Documentation
A template statement responds to an event raised by a binding target such as an element, component, or directive. You'll see template statements ......
Read more >
Template Syntax - ts - Angular 2
Attribute Binding syntax resembles Property Binding. Instead of an element property between brackets, we start with the keyword attr followed by the name...
Read more >
Template syntax - Angular
A template statement responds to an event raised by a binding target such as an element, component, or directive. You'll see template statements...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found