Solution for HTML code

  • 16 December 2021
  • 1 reply
  • 44 views

This is my child component where I am emitting values to parent component

this.lat.emit(this.latitude.toString());
this.lon.emit(this.longitude.toString());
This is my parent.component.html
 <ngx-map (lon)="getLon($event)" (lat)="getLat($event)" ></ngx-map>
This is my parent.component.ts where catch the emitted values

<form [formGroup]="form" (ngSubmit)="create()">

            <input
              status="primary"
              placeholder="Longitude"
              formControlName="longitude"
              type="text"
              nbInput
              fullWidth
              [value]="lon"

            />
            <input
              status="'primary'"
              placeholder="Latitude"
              formControlName="latitude"
              type="text"
              nbInput
              fullWidth
              [value]="lat"
            />
     </form>

I am facing an issue while HTML inputs via the event emitter of
my website's HTML.
Kindly help me out by checking my code. Thanks!
 


1 reply

@jbbattery Hey bro did you find the solution if yes then please let me know the answer too please guide me little more.

Reply