Browse files

Change {{}} to data-ng-bind

This commit changes the index.html page to use data-ng-bind instead of
the {{}} syntax because by doing so the unsightly flash of content
doesn't happen. HT Jeff Goldschrafe.
  • Loading branch information...
1 parent ecefd03 commit 5cc1bad316677b81cef6b688a239b93f116f5135 @napcs committed Apr 17, 2013
Showing with 7 additions and 6 deletions.
  1. +7 −6 public/index.html
13 public/index.html
@@ -21,28 +21,28 @@
<section aria-live="polite" id="tweets">
- {{loadingTwitter}}
+ <div data-ng-bind="loadingTwitter"></div>
<div class="tweet" data-ng-repeat="tweet in tweets">
<img data-ng-src="{{tweet.profile_image_url}}">
- <h2>{{tweet.from_user_name}}</h2>
- <p>{{tweet.text}}</p>
+ <h2 data-ng-bind="tweet.from_user_name"></h2>
+ <p data-ng-bind="tweet.text"></p>
<p><a href="{{tweet.from_user}}/status/{{}}">View on Twitter</a></p>
<section aria-live="polite" id="pics">
- {{looadingFlickr}}
+ <div data-ng-bind="loadingFlickr"></div>
<div data-ng-repeat="image in images">
<a ng-click="showFlickrObject = !showFlickrObject" data-ng-init="showFlickrObject=false">
<img data-ng-src="{{}}">
<div data-ng-class="{dialog_open:showFlickrObject}" data-ng-show="showFlickrObject">
<div class="box_wrapper">
<div class="box">
- <h3>{{image.title}}</h3>
- <p>Author: {{}}</p>
+ <h3 data-ng-bind="image.title"></h3>
+ <p>Author: <span data-ng-bind=""></span></p>
<img data-ng-src="{{}}">
<p><a href="{{}}">View on Flickr</a></p>
<button data-ng-click="showFlickrObject = !showFlickrObject">Close</button>
@@ -59,6 +59,7 @@
<p>Made by <a href="">Brian Hogan</a> with Angular.js. Inspired by <a href="">Twazinga!</a></p>
+ <p>Code is on Github <a href="">here</a>.</p>
<script src="javascripts/angular-1.0.6.js"></script>

0 comments on commit 5cc1bad

Please sign in to comment.