Skip to content

Instantly share code, notes, and snippets.

@poying
Created July 16, 2013 02:49
Show Gist options
  • Save poying/6005374 to your computer and use it in GitHub Desktop.
Save poying/6005374 to your computer and use it in GitHub Desktop.
<div list-input list="spot.transport" ng-init="types={a: '公車', b: '太空船'}" class="control-group">
<label class="control-label">交通方式</label>
<div class="controls">
<select ng-model="data.type" ng-options="key as val for (key, val) in types">
</select>
<input type="text" ng-model="data.detail" placeholder="123 OO站下車,右轉後直走兩分鐘, 捷運|捷運xx站n號出口出來後直走2分鐘" class="m-wrap medium">
<button type="button" class="add btn" ng-click="push()" href="#">新增</button>
<ul class="rows">
<li ng-repeat="i in list"><a ng-click="remove($index)" stop-event href="">刪除</a> || types[i.type] || - || i.detail ||</li>
</ul>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment