Created
February 5, 2013 18:56
Revisions
-
rbpasker created this gist
Feb 5, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ Backbone.Cloudant.database = "/sandbox/"; // start the change handler // Backbone.Cloudant.changeHandler(); PersonView = Backbone.View.extend({ initialize: function () { this.render(); }, template: _.template($("#person_template").html()), render: function() { this.$el.html(this.template(this.model.attributes)); return this; } } ); var all_docs = new Backbone.Cloudant.Docs.Collection(); var all_docs_view = new PersonView({collection: all_docs, id: '#person_template'}); all_docs.fetch().fail(function(){console.log('Could not load all_docs collection');}); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ <script src="jquery/jquery-1.9.0.full.js"></script> <script src="underscore/underscore-1.4.4.full.js"></script> <script src="backbone/backbone-0.9.10.full.js"></script> <script src="cloudant/backbone.cloudant-0.0.1.full.js"></script> <script type="text/template" id="person_template"> <input type="text" id="id" /> </script> HELLOW WORLD <div id="person_container"></div> <script src="js/app2.js"></script>