0.1.1-2 • Published 2 years ago

@tragically-slick/edit-in-place v0.1.1-2

Weekly downloads
-
License
GPL-3.0-only
Repository
-
Last release
2 years ago

Tragically Slick Edit In Place

Overview

Provides a means for having both an edit widget and a display widget in one place in a page and to swap between them based on user interaction.

How To Use The Package

Simply add code to your HTML similar to the following:

<tsm-edit-in-place [editingTemplate]="optionEdit"
                   [displayTemplate]="optionDisplay"
                   [editing]="option.editing">
  <ng-template #optionDisplay>
    <span (click)="option.editing = true">{{ option.item.value }}</span>
  </ng-template>
  <ng-template #optionEdit>
    <input matInput [value]="option.item.value">
  </ng-template>
</tsm-edit-in-place>

The Editing And Displaying Templates

The two templates uses are editingTemplate and displayTemplate which, as their names imply, are used to name the template for editing the value and the template for displaying the value.

The Editing Flag

Use the editing flag to toggle between the two ways of displaying the data.

0.1.1-2

2 years ago

0.1.1-1

3 years ago

0.1.0-5

3 years ago

0.1.0-4

3 years ago

0.1.0-3

3 years ago

0.1.0-2

3 years ago

0.1.0-1

3 years ago

0.1.0-0

3 years ago