Onclick edit button make input field editable

I am new to the web development I need to make input field editable onclick and input field is set to readonly attribute.i am using ionic4-angular4.

<ion-item >  
                  <ion-input placeholder="Profile Name" readonly></ion-input>
               <span item-end><ion-icon  size="small" src="assets/profile/edit.svg" slot="icon-only" id="edit"></ion-icon></span> 
                
              </ion-item>

your ion-input is readonly how you can make it editable.Remove the readonly from ion-input

onclick on the edit button it should turn input field editable

Solution