mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
docs: fix the ng-container binding note in the templates guide
The guide said Angular ignores all attribute bindings and event listeners
on ng-container. The compiler now rejects attribute bindings on it, and a
directive host attribute binding fails at runtime. Property bindings only
work for directive inputs, and unknown ones are reported as errors.
Class bindings, style bindings, DOM event listeners and static attributes
are still ignored, so describe each case.
(cherry picked from commit b223af6b84)
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
You can apply directives to `<ng-container>` to add behaviors or configuration to a part of your template.
|
||||
|
||||
Angular ignores all attribute bindings and event listeners applied to `<ng-container>`, including those applied via directive.
|
||||
Angular ignores class bindings, style bindings, DOM event listeners, and static attributes applied to `<ng-container>`, including those applied via directive. Attribute bindings cause errors, and property bindings only work for directive inputs.
|
||||
|
||||
## Using `<ng-container>` to display dynamic contents
|
||||
|
||||
|
||||
Reference in New Issue
Block a user