Looking to display address contents that start with the example DRACHMAN
. I attempted to use match()
, but it didn't work as expected. Here is my demo on Stackblitz.
HTML
<form (ngSubmit)="onSubmit()" #Form="ngForm">
<div class="form-group">
<label for="address">Address</label>
<textarea class="form-control" id="name"
required
[(ngModel)]="data.address" name="address"
#name="ngModel"></textarea>
</div>
<button type="submit" class="btn btn-success">Submit</button>
</form>
Component
data = {
address: 'Bla..Bla..Bla.. 421 E DRACHMAN TUCSON AZ 5705-7598 USA'
}
The desired output should look like the image seen here: