Created
March 21, 2013 11:16
-
-
Save bettysteger/5212298 to your computer and use it in GitHub Desktop.
example template for a single page application, see http://bettysteger.com/single-page-application-with-rails-3-and-angularjs/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row-fluid" ng-controller="ShowsCtrl"> | |
<div class="span6"> | |
<h1>{{seenCount()}} of {{shows.length}} seen</h1> | |
<ul class="past"> | |
<li ng-repeat="show in shows | filter:query | orderBy:orderProp" class="seen-{{show.seen}}"> | |
<i ng-click="toggleSeen(show)" ng-class="{true:'icon-white icon-eye-close', false:'icon-white icon-eye-open'}[show.seen]" | |
title="seen?"></i> | |
<a href="#{{show.id}}">{{show.name}}</a> | |
<br /> | |
<time>{{show.latest.date | date:'dd MMM yyyy hh:mm a'}}</time> | |
</li> | |
</ul> | |
</div> | |
<div class="span5"> | |
<h1>setup</h1> | |
<div class="controls"> | |
<input type="text" ng-model="query" class="input-medium" ng-show="shows.length>0" | |
placeholder="search your shows"> | |
<!-- Sort by: | |
<select ng-model="orderProp"> | |
<option value="date" selected="selected">date</option> | |
<option value="name">name</option> | |
<option value="seen">seen</option> | |
</select> --> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment