To support recovery of malformed binding property names like `([a)`, `[a`, or `()`, the binding parser needs to be more permissive w.r.t. the kinds of bindings it can detect. This is difficult to do maintainably with a regex, but is trivial with a "hand-rolled" string parser. This commit refactors render3's binding attribute parsing to use this method for multi-delimited bindings (namely via the `()`, `[]`, and `[()]`) syntax, making the way recovery of malformed bindings in a future patch. Note that we can keep using a regex for prefix-only binding syntax (e.g. `bind-`, `ref-`) because validation of the binding is complete once we have matched the prefix, and the only thing left to do is check that the binding identifier is non-empty, which is trivial. Part of #38596 PR Close #39375
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT