﻿<div ng-controller="SalesAgentCtrl">
    <h2>Agents</h2>
    <div class="row">
        <div class="large-6 columns">
            <ul>
                <li ng-repeat="agent in agents">
                    <a href="sales-agent/{{ agent.id }}">{{ agent.name }}</a> - 
                    <small><a ng-click="delete(agent)">Delete</a></small>
                </li>
            </ul>
        </div>
        <div class="large-6 columns">
            <h4>Add New</h4>
            <form ng-submit="save()" ng-model="agent">
                <div class="control-group">
                    <label>Name: <input type="text" ng-model="agent.name" /></label>
                </div>
                <div class="control-group">
                    <label>Profile Image: <input type="url" ng-model="agent.imageUrl" /></label>
                </div>
                <div class="control-group">
                    <input type="submit" id="submit" value="Save" />
                </div>
            </form>
        </div>
    </div>
</div>
