-
-
Save codecademydev/626e5f3979fb0cab88aadd5c1c72be9f to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="event-detail"> | |
<h2 class="event-name">{{ event.name }}</h2> | |
<p class="time"><span class="from">{{ event.from | date:'shortTime' }}</span> - <span class="to">{{ event.to | date:'shortTime' }}</span></p> | |
<p class="where">{{ event.where }}</p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.controller('EventController', ['$scope','events', '$routeParams', function($scope,events, $routeParams) { | |
events.success(function(data) { | |
$scope.event = data[$routeParams.id]; | |
}); | |
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('events',['$http', function($http) { | |
return $http.get('https://s3.amazonaws.com/codecademy-content/courses/ltp4/events-api/events.json') | |
.success(function(data) { | |
return data; | |
}) | |
.error(function(err) { | |
return err; | |
}); | |
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<link href="https://s3.amazonaws.com/codecademy-content/projects/bootstrap.min.css" rel="stylesheet" /> | |
<link href="css/main.css" rel="stylesheet" /> | |
<script src="js/vendor/angular.min.js"></script> | |
<script src="https://code.angularjs.org/1.2.28/angular-route.min.js"></script> | |
</head> | |
<body ng-app="CalendarApp"> | |
<div class="header"> | |
<div class="container"> | |
<img src= "img/logo.svg" width="51" height="54"> | |
</div> | |
</div> | |
<div class="main"> | |
<div class="container"> | |
<div ng-view></div> | |
</div> | |
</div> | |
<!-- Modules --> | |
<script src="js/app.js"></script> | |
<!-- Controllers --> | |
<script src="js/controllers/DayController.js"></script> | |
<script src="js/controllers/EventController.js"></script> | |
<!-- Services --> | |
<script src="js/services/events.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment