O'Reilly logo

AngularJS by Example by Chandermani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The 7 Minute Workout view

Most of the hard work has already been done while the defining the model and implementing the controller phase. Now we just need to skin the HTML using the super-awesome data binding capabilities of AngularJS. It's going to be simple, sweet, and elegant!

For the 7 Minute Workout view, we need to show the exercise name, exercise image, a progress indicator, and time remaining. Add the following lines to index.html inside the container div.

<div class="container body-content app-container">
  <div class="row">
    <div id="exercise-pane" class="col-sm-8 col-sm-offset-2">
       <div class="row workout-content">
          <div class="workout-display-div">
             <h1>{{currentExercise.details.title}}</h1>
             <img class="img-responsive" ng-src="{{currentExercise.details.image}} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required