This file contains hidden or 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
<Response> | |
<Say voice="alice">Hello!</Say> | |
</Response> |
This file contains hidden or 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
var myToDoModel = Backbone.Model.extend({ | |
urlRoot: 'http://tiny-pizza-server.herokuapp.com/collections/alex-todo-items', | |
defaults: { | |
todo: null, | |
completed: true | |
}, | |
idAttribute: '_id' | |
}); | |
I am very proud of the Backbone model I created above for two reasons. Firstly, this model |
This file contains hidden or 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
.controller('JournalCtrl', function($scope, $http, $interval) { | |
$interval(function() { | |
$http.get('http://tiny-pizza-server.herokuapp.com/collections/alex-hackathon-journal1') | |
.success(function(response){ | |
$scope.messages = []; | |
for( var i = 0; i < response.length; i++ ) { | |
if(response[i].plantType && response[i].plantQuantity && response[i].plantNotes) { | |
$scope.messages.push(response[i]); |
This file contains hidden or 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
function timeStamp() { | |
// Create a date object with the current time | |
var now = new Date(); | |
// Create an array with the current month, and day | |
var date = [ now.getMonth() + 1, now.getDate(), now.getFullYear() ]; | |
// Return the formatted string | |
return date.join("/") + suffix; |
NewerOlder