partials/addFavoriteModal.html
<form class="form-horizontal" id="add-favorite-modal">
<div class="modal-header">
<button type="button" class="close" ng-click="ok()"><span class="glyphicon glyphicon-remove"></span></button>
<h4 class="modal-title">Add Favorite</h4>
</div>
<div class="modal-body">
<div class="panel-body">
<p>The current request will be saved as a favorite. The request method (GET/POST etc.) and any payload or headers will also be saved.</p>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">Name:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="name" list="favoriteNames" placeholder="Example: Auth Service (QA)" ng-model="name" maxlength="50" autofocus>
<datalist id="favoriteNames">
<option ng-repeat="favorite in favorites" value="{{favorite.name}}">
</datalist>
<p class="help-block">Enter a name for the new favorite.</p>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary" ng-click="ok(name)" ng-disabled="!name">Add</button>
<button class="btn btn-default" ng-click="ok()">Cancel</button>
</div>
</form>