@WidgetComponent

list-cell-interaction-link

File

src/app/shared/widgets/data-list/list-cell-widgets/list-cell-interaction-link/list-cell-interaction-link-widget.component.ts

Implements

CellWidget

Metadata

selector list-cell-interaction-link
styleUrls list-cell-interaction-link-widget.component.scss
templateUrl ./list-cell-interaction-link-widget.component.html

Index

Widget inputs
Widget outputs
Properties
Methods

Constructor

constructor()

Methods

Protected configureWidget
configureWidget(configuration: WidgetConfig)
Decorators : WidgetConfigure
Parameters :
Name Type Optional
configuration WidgetConfig no
Returns : void
openLink
openLink(event: )
Parameters :
Name Optional
event no
Returns : boolean

Properties

Public configuration
configuration: WidgetConfig
Type : WidgetConfig
Decorators : WidgetConfiguration
Public icon
icon: String
Type : String
Public row
row: any
Type : any
Public selector
selector: any
Type : any
Public value
value:
import { Component } from "@angular/core";
import {
  WidgetComponent,
  WidgetConfiguration,
  WidgetConfigure,
} from "../../../widget.metadata";
import { CellWidget } from "../../../../components/list-cell";
import { WidgetConfig } from "../../../widget.configuration";

@WidgetComponent("list-cell-interaction-link")
@Component({
  selector: "list-cell-interaction-link",
  templateUrl: "./list-cell-interaction-link-widget.component.html",
  styleUrls: ["./list-cell-interaction-link-widget.component.scss"],
})
export class ListCellInteractionLinkWidgetComponent implements CellWidget {
  public row: any;
  public value;
  public icon: String;

  @WidgetConfiguration()
  public configuration: WidgetConfig;

  public selector: any;

  constructor() {}

  @WidgetConfigure()
  protected configureWidget(configuration: WidgetConfig) {
    this.selector = configuration.configuration.selector;
  }

  openLink(event) {
    event.stopPropagation();
    event.preventDefault();
    return false;
  }
}
<div>
  <nm-interactions
    [selectors]="selector"
    [param]="row"
    [actionTemplate]="linkAction"
  >
  </nm-interactions>
</div>

<ng-template
  #linkAction
  let-onClick="onClick"
  let-configuration="configuration"
  let-param="param"
>
  <a (click)="openLink($event); onClick($event)">
    <nm-ellipsis [content]="value"></nm-ellipsis>
  </a>
</ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""