File

src/app/components/add-node/add-node.component.ts

Description

Angular component representing the add node form.

Metadata

selector app-add-node
styleUrls add-node.component.css
templateUrl add-node.component.html

Inputs

container

Input property to receive data from a parent component.

Type: any

Constructor

constructor(grapheS: any)

Initializes a new instance of the AddNodeComponent class.

Parameters :

Methods

onInputFocus
onInputFocus()

Event handler for when the input field receives focus.
Sets the inputTouched flag to true.

Returns: void

Properties

inputTouched
inputTouched: boolean
Default value: false

Indicates whether the input field has been touched or focused.

nodeId
nodeId: any

The ID of the new node.

import { Component,Input } from '@angular/core';
import { GrapheService } from 'src/app/Services/graphe.service';

/**
 * Angular component representing the add node form.
 */
@Component({
  selector: 'app-add-node',
  templateUrl: './add-node.component.html',
  styleUrls: ['./add-node.component.css']
})
export class AddNodeComponent {
  /**
   * The ID of the new node.
   */
  nodeId:any;
  /**
   * Indicates whether the input field has been touched or focused.
   */
  inputTouched:boolean = false;
  /**
   * Input property to receive data from a parent component.
   */
  @Input() container:any;
  /**
   * Initializes a new instance of the AddNodeComponent class.
   *
   * @param {GrapheService} grapheS - The GrapheService instance.
   */
  constructor(protected grapheS:GrapheService){

  }
  /**
   * Event handler for when the input field receives focus.
   * Sets the `inputTouched` flag to true.
   */
  onInputFocus(){
    this.inputTouched=true;
  }
}

results matching ""

    No results matching ""