I want to append html tag to every element in id and show it in text box like 1 x,2 x,3 x.(x is close button using ×)
I am using the following code.
My html tag
<input type="text" id="receiver" class="form-control input-sm" ng-model="to" />
Angularjs controller
$scope.to="";
$scope.id=[1,2,3];
$scope.append = function ($event) {
$scope.to=$scope.to+id[0]+('<div class="close" data-dismiss="modal">×</div>');
}
But I am getting following output :
1 <div class="close" data-dismiss="modal">×</div>,2<div class="close" data-dismiss="modal">×</div>,3<div class="close" data-dismiss="modal">×</div>
Can any one help me.