Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created February 18, 2014 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrjmarshall/9062540 to your computer and use it in GitHub Desktop.
Save willrjmarshall/9062540 to your computer and use it in GitHub Desktop.
angular.module("Checkout").controller "SummaryCtrl", ($scope) ->
$scope.purchase = ()->
alert("catS")
<orderdetails ng-app="Checkout" ng-controller="SummaryCtrl">
<form accept-charset="UTF-8" action="#" class="edit_order" id="edit_order_2799" method="post" ng-submit="purchase()"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"><input name="_method" type="hidden" value="put"><input name="authenticity_token" type="hidden" value="JgWuLJQFKuKnOHfaUPz4fMnewTeIDwKns0SZX/YUaSM="></div> <fieldset>
<legend>Your Order</legend>
<table>
<tbody><tr>
<th>Cart subtotal</th>
<td>$1.00</td>
</tr>
<tr>
<th>Distribution</th>
<td>$1.00</td>
</tr>
<tr>
<th>Cart total</th>
<td>$2.00</td>
</tr>
</tbody></table>
<input class="button" name="commit" ng-click="purchase()" type="submit" value="Purchase">
</fieldset>
</form>
</orderdetails>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment