//sample solution to MainController.js
app.controller('MainController',
['$scope', function($scope) {
$scope.title = 'My Own String';
$scope.promo = 'Your Own String';
$scope.products =
[
{
name: 'The Book of Trees',
price: 19,
pubdate: new Date('2014', '03', '08'),
cover: 'img/the-book-of-trees.jpg'
},
{
name: 'Program or be Programmed',
price: 8,
pubdate: new Date('2013', '08', '01'),
cover: 'img/program-or-be-programmed.jpg'
}
]
}]);
<!-- sample solution for a portion of index.html -->
<div ng-repeat="product in products" class="col-md-6">
<div class="thumbnail">
<img src="img/the-book-of-trees.jpg">
<p class="title">{{ product.name }}</p>
<p class="price">{{ product.price | currency }}</p>
<p class="date">{{ product.pubdate | date }}</p>
</div>
</div>
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>
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>
Codecademy FIlters I
<!-- 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 }}</p>
<p class="price">{{ product.price | currency }}</p>
<p class="date"> </p>
</div>
</div>
</div>
</div>
<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 }}</p>
<p class="price">{{ product.price | currency }}</p>
<p class="date"> </p>
</div>
</div>
</div>
</div>
Codecademy Workflow
//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 }
}]);
<!-- sample solution to 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 }}</p>
<p class="price">{{ product.price }}</p>
<p class="date"> </p>
</div>
</div>
</div>
</div>
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 }
}]);
<!-- sample solution to 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 }}</p>
<p class="price">{{ product.price }}</p>
<p class="date"> </p>
</div>
</div>
</div>
</div>
Codecademy Hello AngularJS II
//Sample Solution for MainController.js
app.controller('MainController',
['$scope', function($scope) {
$scope.title = 'My Own String';
$scope.promo = 'Your Own String';
}]);
<!--Sample Solution for index.html-->
<div class="main" ng-controller="MainController">
<div class="container">
<h1>{{ title }}</h1>
<h2>{{ promo }}</h2>
</div>
</div>
app.controller('MainController',
['$scope', function($scope) {
$scope.title = 'My Own String';
$scope.promo = 'Your Own String';
}]);
<!--Sample Solution for index.html-->
<div class="main" ng-controller="MainController">
<div class="container">
<h1>{{ title }}</h1>
<h2>{{ promo }}</h2>
</div>
</div>
Subscribe to:
Posts (Atom)
This is an example of scrolling text using Javascript.
Popular Posts
-
$VERBOSE = nil # We'll explain this at the end of the lesson. require 'prime' # This is a module. We'll cover these s...
-
Problem: The Collatz function is defined as f(n) = 3n+1 for odd values of n and f(n) = n/2 for even values of n. What is the smallest poss...
-
# Sample Solution # Import packages import numpy as np import pandas as pd # Read in transactions data transactions = pd.read_csv(...
-
<!--sample solution--> <html> <head> <title>Doubling the Chocolate Chip Cookies Recipe</title>...
-
//sample solution to style.css aside { width: 120px; float: right; margin: 0px 0px 10px 10px; }
-
public class Comments { public static void main(String[] args) { //System.out.println("Noise!"); /* anything you l...
-
$(document).ready(function(){ $("button").on("click", function(){ var message = $("<span>Call 1-555-...
-
//sample solution function isMAC48Address(inputString) { if(inputString.length!=17){ return false; } var regex = /^([0-9A...
-
//Sample solution to main.js var red = [0, 100, 63]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; ...
-
<!-- Sample solution to index.html --> <!DOCTYPE html> <html> <body> <div class="nav"> ...