“Ng, jeśli jeszcze” Kod odpowiedzi

ngif inaczej

<div *ngIf="isLoggedIn; else loggedOut">
  Welcome back, friend.
</div>

<ng-template #loggedOut>
  Please friend, login.
</ng-template>
Gorgeous Gentoo

Ng, jeśli jeszcze

<div *ngIf="condition; else elseBlock">Content to render when condition is true.</div>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
GrepperFoo69

Ng, jeśli jeszcze

<div *ngIf="condition; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>Content to render when condition is true.</ng-template>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
    
Victorious Vulture

ngif inaczej

      
        content_copy
      
      <div *ngIf="condition; then thenBlock else elseBlock"></div>
<ng-template #thenBlock>Content to render when condition is true.</ng-template>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
    
Fair Finch

Ng, jeśli jeszcze

<div *ngIf="isValid;else other_content">
    content here ...
</div>

<ng-template #other_content>other content here...</ng-template>
Cheerful Caterpillar

Odpowiedzi podobne do “Ng, jeśli jeszcze”

Pytania podobne do “Ng, jeśli jeszcze”

Więcej pokrewnych odpowiedzi na “Ng, jeśli jeszcze” w HTML

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu