When I click enter on the textarea in buttom formgroup the remove method defined top form group gets called . Not sure why and how can this be avoided ? I had added a ngkeyup event on the textarea even still then the remove method gets called when I enter on the textbox .
<div class="form-group" name="form-group1">
<label class="col-sm-2 control-label">{{col1label}}</label>
<div class="col-sm-6">
<div ng-repeat="label in list">
<div class="col-sm-6">
<div class="input-group">
<input type="text" class="form-control" ng-model="label.name">
<span class="input-group-btn">
<button type="submit" class="pull-right btn btn-white" name="btn" ng-click="remove(label.name)">
<i class="fa fa-trash"></i>
</button>
</span>
</div>
</div>
<div class="col-sm-8"></div>
</div>
</div>
</div>
<div class="form-group" name="form-group2">
<label class="col-sm-2 control-label">{{column2label}}</label>
<div class="col-sm-6">
<div class="input-group">
<input type="text" class="form-control" ng-model="text" name="textarea" placeholder="{{col2placeholder}}">
<span class="input-group-btn">
<button type="submit" class="pull-right btn btn-white" name="addButton" ng-click="addvalue()">
<i class="fa fa-plus-square"></i>
</button>
</span>
</div>
</div>
</div>
Found the answer . made the button type as button instead of submit .This prevented enter event being triggered . button type="button" class="pull-right btn btn-white" name="addButton" ng-click="addvalue()">