Skip to content

Instantly share code, notes, and snippets.

@mseeks
Created February 12, 2013 00:05
Show Gist options
  • Save mseeks/4758813 to your computer and use it in GitHub Desktop.
Save mseeks/4758813 to your computer and use it in GitHub Desktop.
define(['jquery', 'bootstrap', 'plates', 'resource', 'underscore'], function($, Bootstrap, plates, Resource, _) {
var Issue = {
list: function(callback) {
Resource.Issue.all(function(issues) {
var template = $('#issue').html();
var bound = Plates.bind(template, issues);
$('.table').append(bound);
$('.issue').show();
console.log(bound);
});
},
show: function(id) {
Resource.Issue.get(id, function(issue) {
var template = $('#issue').html();
var bound = Plates.bind(template, issue);
$('.issue').html(bound);
$('.issue').modal('show');
});
}
};
return {
Issue: Issue
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment