Currently whatever the user enters in the text box and clicks the button, is being displayed inside anchor tags dynamically (all in new lines).

Textbox and the button (HTML file)-

```
<input type="text" name="inputText"><br>

<tr>
        <input type="button" value="ADD" ng-click="$ctrl.addtext()">
</tr>

<div id="outputDiv"></div>

```

JS function-

```
ctrl.addtext = function () {
    var div = document.getElementById('outputDiv');
    div.innerHTML += "<a href='' style='margin-left:10px'>"+newtext+"</a><br>";
}

```

Is there a way to add a close/remove button (like an X) at end of the dynamically created anchor tags, that On-click remove those particular rows of only?