Skip to content

Instantly share code, notes, and snippets.

@sdepold
Created May 9, 2012 19:04
Show Gist options
  • Save sdepold/2648051 to your computer and use it in GitHub Desktop.
Save sdepold/2648051 to your computer and use it in GitHub Desktop.
private/public in js
Layout.ScrumBoard = (function() {
"use strict"
var ScrumBoard = function() {
}
ScrumBoard.prototype.render = function() {
getActivities.call(this, function(data) {
console.log(data)
})
}
var getActivities = function(callback) {
console.log(callback)
$.getJSON('/activities', {
sprintStart: Application.Index.SprintStart.getValue()
}).success(function(data) {
callback && callback(data)
}).error(function(err) {
console.log(err)
})
}
return ScrumBoard
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment