The example for the Expansion Panel at the Angular Material design website 
shows a "self-aware" panel that sets a variable based on the panel's 
open/closed state. What I would like to do is display some content in the 
panel header depending on the panel's open/closed state. I would like to do 
this without having to maintain a variable within the accompanying 
typescript file. How can I do this?

<mat-expansion-panel class="supervisor-panel">
  <mat-expansion-panel-header>
    <div class="supervisor">1001 Clark Kent</div>

    <!-- this is the code I need -->
    {{ thisPanel.expanded ? 'Open' : 'Closed }}

  </mat-expansion-panel-header>
  <div>Expanded content</div>
</mat-expansion-panel>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to