Quotes help make search much faster. Example: "Practice Makes Perfect"

Friday, April 17, 2015

Codecademy Filters II


//Sample solution to MainController.js

app.controller('MainController',
['$scope', function($scope) {
  $scope.title = 'My Own String';
  $scope.promo = 'Your Own String';
  $scope.product = { name: 'The Book of Trees', price: 19, pubdate: new Date('2014', '03', '08') }
}]);

<!-- sample solution to a portion of index.html -->
<div class="main" ng-controller="MainController">
      <div class="container">

        <h1>{{ title }}</h1>
        <h2>{{ promo }}</h2>

        <div class="col-md-6">
          <div class="thumbnail">
            <img src="img/the-book-of-trees.jpg">
            <p class="title">{{ product.name | uppercase }}</p>
            <p class="price">{{ product.price | currency }}</p>
            <p class="date">{{ product.pubdate | date }}</p>
          </div>
        </div>

     </div>
 </div>

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts