File

projects/i-components/src/lib/components/button/test/button-mock.ts

Metadata

selector wm-mock-button
template
<wm-button
  [name]="name"
  [content]="content"
  [tag]="tag"
  [visibility]="visible"
  [command]="commd"
  [commandParameter]="param"
  [background]="bg"
  (loaded)="loadedHandler($event.sender, $event.e)"
  (click)="clickHandler($event.sender, $event.e)"
  [minHeight]="0"
  [maxHeight]="500"
  [minWidth]="100"
  [maxWidth]="300"
>
</wm-button>

Index

Properties
Methods

Methods

clickHandler
clickHandler(s: any, _a: any)
Parameters :
Name Type Optional
s any No
_a any No
Returns : void
loadedHandler
loadedHandler(_s: any, _a: any)
Parameters :
Name Type Optional
_s any No
_a any No
Returns : void

Properties

bg
Type : string
Default value : 'Red'
commd
Default value : new SimpleDelegateCommand(() => {})
content
Type : string
Default value : 'this is a content'
isPressedDuringClickHandler
Type : null
Default value : null
loadedCount
Type : number
Default value : 0
name
Type : string
Default value : 'button1'
param
Type : string
Default value : 'A Parameter'
tag
Type : object
Default value : { prop1: 'content' }
visible
Default value : true
import { Component } from '@angular/core';
import { SimpleDelegateCommand } from '@mobilize/wms-framework';

@Component({
  selector: 'wm-mock-button',
  template: `
    <wm-button
      [name]="name"
      [content]="content"
      [tag]="tag"
      [visibility]="visible"
      [command]="commd"
      [commandParameter]="param"
      [background]="bg"
      (loaded)="loadedHandler($event.sender, $event.e)"
      (click)="clickHandler($event.sender, $event.e)"
      [minHeight]="0"
      [maxHeight]="500"
      [minWidth]="100"
      [maxWidth]="300"
    >
    </wm-button>
  `,
  styles: [],
})
export class ButtonMockComponent {
  content = 'this is a content';
  tag = { prop1: 'content' };
  name = 'button1';
  visible = true;
  commd = new SimpleDelegateCommand(() => {});
  param = 'A Parameter';
  bg = 'Red';
  loadedCount = 0;
  isPressedDuringClickHandler = null;

  loadedHandler(_s: any, _a: any) {
    this.loadedCount++;
  }

  clickHandler(s: any, _a: any) {
    this.isPressedDuringClickHandler = s.IsPressed;
  }
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""