@if
block conditionally displays its content when its condition expression is truthy. triggers
the toggle
method.toggle
changes the visible
signal's value.<h1>
element is displayed or hidden based on the visible
signal's state.@if
block might have one or more associated @else blocks. Immediately after an @if
block, you can optionally specify any number of @else if
blocks and one @else
block signIn()
, setting logged
to true
, showing the "Hi Dev" message and "Logout" button.logout(),
setting logged
to false
, showing the "Login" message and "Sign In" button.