/*global Galorie, $*/


window.Galorie = {
    Models: {},
    Collections: {},
    Views: {},
    Routers: {},
    init: function () {
        'use strict';
        console.log('Hello from Backbone!');
    }
};

$(document).ready(function () {
    'use strict';
    Galorie.init();
});

@@ -280,8 +280,869 @@
 ();%0A%7D);%0A
+%0A//Backbone Model%0Avar Calorie = Backbone.Model.extend(%7B%0A    defaults: %7B%0A        food : '',%0A        portion: '',%0A        calorie_intake: ''%0A    %7D%0A%7D);%0A%0A//Backbone Collection%0Avar Calories = Backbone.Collection.extend(%7B%7D)%0A%0Avar breakfast = new Calorie(%7Bfood:'banana', portion:3, calorie_intake:10 %7D);%0Avar lunch = new Calorie(%7Bfood:'sandwich', portion:1, calorie_intake:400 %7D);%0Avar dinner = new Calorie(%7Bfood:'veggie_burger', portion:1, calorie_intake:250 %7D); %0A    %0A//instantiate Collection%0Avar calories = new Calorie();%0A%0A//Backbone View for one calorie%0Avar CalorieView = Backbone.View.extend(%7B%0A    model: new Calorie(),%0A    tagName: %E2%80%98tr%E2%80%99,%0A    initialize: function()%7B%0A      this.template = _.template($('.calories-list-template').html())         %0A    %7D,%0A    render: function()%7B%0A      this.$el.html(this.template(this.model.toJSON()));%0A      return this;%0A    %7D%0A%7D);%0A%0A%0A%0A

Add calorie model and collection