It's like routing... but not!
(have a whiteboard and marker)
For some this may feel like a valley...
Don't worry!
This technique is called Post It
You'll revisit these!
(note the bullet points on your whiteboard)
This is revisiting Post It, time for a CFU
<!DOCTYPE html>
<html lang="en" ng-app='routingApp'>
<head>
<title>It's routing time</title>
<script src="./bower_components/angular/angular.js"></script>
<script src="./bower_components/angular-route/angular-route.js"></script>
<script src="app.js"></script>
</head>
<body>
Which page are you on now?
<div ng-view></div>
</body>
</html>
HTML
This is revisiting Post It, time for a CFU
var app = angular.module('routingApp', ['ngRoute'])
app.config(function($routeProvider){
$routeProvider.
when('/', {
templateUrl: 'partials/hearthstone.html',
controller: 'GamesController'
})
})
app.controller('GamesController', function($scope){
$scope.favoriteGame = "Hearthstone"
})
Javascript
This is revisiting Post It, time for a CFU
<div>
My favorite game is: {{favoriteGame}}
</div>
Template
Create a:
Use Angular routing to *move* between your pages!
This technique is called Post It
You'll revisit these!