Skip to content

Instantly share code, notes, and snippets.

@NickToye
Created October 22, 2015 08:06
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 NickToye/9d97ed5129d41ca540f8 to your computer and use it in GitHub Desktop.
Save NickToye/9d97ed5129d41ca540f8 to your computer and use it in GitHub Desktop.
<div ng-controller="StoreController as store" class="row">
<form novalidate method='get' name="storesForm" id='searchForm' ng-controller="StoreController as storeCtrl" ng-submit="store.submit()">
<label for="postcode" class="controls__label">Postcode</label>
<input required type="text" name="postcode" placeholder="Search..." ng-model="store.postcode">
<input type="submit" value="Search">
</form>
<section class="cards col-lg-6">
<article ng-repeat="store in store.stores | limitTo:2" class="card">
<address>
<h3 ng-if="store.outlet" class="title">{{store.outlet}}</h3>
<p ng-if="store.phone" class="tel">t. {{store.phone}}</p>
<p class="address1"><span ng-if="store.addressOne">{{store.addressOne}}, <br /></span>
<span ng-if="store.addressTwo">{{store.addressTwo}}, <br /> </span>
<span ng-if="store.addressThree">{{store.addressThree}}, <br /></span>
<span ng-if="store.town">{{store.town}}, <br /></span>
<span ng-if="store.county">{{store.county}}, <br /></span>
<span ng-if="store.postCode">{{store.postCode}}</span>
</p>
<a class="btn btn--primary" ng-href="Store/{{store.outlet}}">View Store</a>
</address>
</article>
</section>
<aside class="col-lg-4">
<div ng-view></div>
<table class="table table--bordered table--condensed">
<thead>
<tr>
<th>Item</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>$location.path()</td>
<td>{{$location.path()}}</td>
</tr>
<tr>
<td>$route.current.templateUrl</td>
<td>{{$route.current.templateUrl}}</td>
</tr>
<tr>
<td>$route.current.params</td>
<td>{{$route.current.params}}</td>
</tr>
<tr>
<td>$route.current.scope.name</td>
<td>{{$route.current.scope.name}}</td>
</tr>
<tr>
<td>$routeParams</td>
<td>{{$routeParams}}</td>
</tr>
</tbody>
</table>
</aside>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment