Skip to main content
cngx-src documentation

CngxExpandableToggle

Directivev0.1.0

projects/common/layout/text/expandable-text.ts

Import#

import { CngxExpandableToggle } from '@cngx/common/layout'

Description#

Marks a custom toggle template inside cngx-expandable-text.

<cngx-expandable-text [lines]="3">
  Long text…
  <ng-template cngxExpandableToggle let-expanded let-toggle="toggle">
    <button (click)="toggle()" class="icon-btn">
      <mat-icon>{{ expanded ? 'expand_less' : 'expand_more' }}</mat-icon>
    </button>
  </ng-template>
</cngx-expandable-text>

Metadata#

Dependencies#

TemplateRefconstructor

Index#

Properties

Instance Properties#

templateRef#TemplateRef
PublicReadonly