KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is there a way to make a function private in backbone, so that it is only exposed to the model itself and also have access to this ? How can I make updateTime private? var Timeline = Backbone.Model.extend({ url: 'servertime/', start: function(){ this.fetch({ success: function(timeline, response){ timeline.updateTime(); setInterval(function() { timeline.updateTime(); }, 60 * 1000); } }); }, updateTime: function(){ //How can I make this private? this.time = ... } });
Tags (comma-separated)
Save Edits
Cancel