docs(docs-infra): update NG0910 documentation with new control flow

This commit is contained in:
Pratyush Swain 2025-11-30 13:38:04 +05:30 committed by Pawel Kozlowski
parent 7b33554d24
commit 27d1ccb2df

View file

@ -52,10 +52,14 @@ The recommended solution is to use the mentioned attributes as static ones, for
```
If you need to have different values for these attributes (depending on various conditions),
you can use an `*ngIf` or an `*ngSwitch` on an `<iframe>` element:
you can use the `@if` or `@switch` control flow blocks to conditionally render the appropriate `<iframe>` element:
```angular-html
<iframe *ngIf="someConditionA" sandbox="allow-scripts" src="..."></iframe>
<iframe *ngIf="someConditionB" sandbox="allow-forms" src="..."></iframe>
<iframe *ngIf="someConditionC" sandbox="allow-popups" src="..."></iframe>
@if (someConditionA) {
<iframe sandbox="allow-scripts" src="..."></iframe>
} @else if (someConditionB) {
<iframe sandbox="allow-forms" src="..."></iframe>
} @else {
<iframe sandbox="allow-popups" src="..."></iframe>
}
```