File

src/app/manage-learn/questionnaire/remarks-modal/remarks-modal.component.ts

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(modal: ModalController)
Parameters :
Name Type Optional
modal ModalController No

Inputs

button
Type : string
data
Type : any
required
Type : boolean

Methods

close
close()
Returns : void
ngAfterViewChecked
ngAfterViewChecked()
Returns : void
update
update()
Returns : void

Properties

hideBack
remarkInput
Decorators :
@ViewChild('remarkInput', {static: false})
import { Component, Input, ViewChild } from '@angular/core';
import { ModalController } from '@ionic/angular';

@Component({
  selector: 'app-remarks-modal',
  templateUrl: './remarks-modal.component.html',
  styleUrls: ['./remarks-modal.component.scss'],
})
export class RemarksModalComponent {
  @ViewChild('remarkInput',  {static: false}) remarkInput;
  hideBack;
  @Input() data: any;
  @Input() button: string;
  @Input() required: boolean;

  constructor(private modal: ModalController) {}


  close(): void {
    this.modal.dismiss();
  }

  update(): void {
    this.modal.dismiss(this.data.remarks);
  }

  ngAfterViewChecked() {
    this.remarkInput.setFocus();
  }
}


<ion-content class="ion-padding">
  <ion-item>
    <ion-textarea [(ngModel)]="data.remarks" placeholder="Remarks" #remarkInput style="height: 40vh"></ion-textarea>
  </ion-item>
</ion-content>

<div class="_footer" no-padding>
  <ion-row>
    <ion-col>
      <ion-button icon-start expand="full" color="light" (click)="close()" class="custom-btn-txt-transform-none">
        {{'CANCEL'|translate}}
      </ion-button>
    </ion-col>
    <ion-col>
      <ion-button icon-start expand="full"  (click)="update()" color="primary" class="custom-btn-txt-transform-none"
        [disabled]="required ? !data.remarks : false">
        {{'FRMELEMENTS_BTN_ADD'|translate}}
      </ion-button>
    </ion-col>
  </ion-row>
</div>

./remarks-modal.component.scss

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""