Add a function to add a prefix to an input click event. Something like below:
<input #companyUrl (click)="addHttpPrefix()" >
And in this function 1. Get the value of companyUrl. 2. Check if it starts with http, and then skip the else prepend with http: //
if(companyUrl.indexOf('http') > -1) {
companyUrl = 'http://' + companyUrl;
}
That way, when the user first clicks on the http: // input, it will be added. if the event (click) does not meet your requirement, you can try to use (change) or other events.