Skip to content
Snippets Groups Projects
Commit b87a4c40 authored by ahmadhakeem18's avatar ahmadhakeem18 Committed by Andrew Kushnir
Browse files

docs: update NgClass example description to match the example's behavior (#55209)


Co-authored-by: default avatarSonu Kapoor <sonukapoor@users.noreply.github.com>

PR Close #55209
parent 4f9084e5
Branches
Tags
......@@ -63,8 +63,8 @@ Because `isSpecial` is true, `ngClass` applies the class of `special` to the `<d
<docs-code header="src/app/app.component.html" path="adev/src/content/examples/built-in-directives/src/app/app.component.html" visibleRegion="NgClass-1"/>
For this use case, Angular applies the classes on initialization and in case of changes.
The full example calls `setCurrentClasses()` initially with `ngOnInit()` and when the dependent properties change through a button click.
For this use case, Angular applies the classes on initialization and in case of changes caused by reassigning the `currentClasses` object.
The full example calls `setCurrentClasses()` initially with `ngOnInit()` when the user clicks on the `Refresh currentClasses` button.
These steps are not necessary to implement `ngClass`.
## Setting inline styles with `NgStyle`
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment