-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carets -- Guillermina #29
base: master
Are you sure you want to change the base?
Conversation
BackTREKWhat We're Looking For
|
const selectedTrip = tripList.findWhere({id: selectedId}); | ||
console.log(url); | ||
$('#trip-details').show(); | ||
$.get(url, function(response) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try to use Backbone's fetch
function for models here instead of directly using jQuery's ajax functions.
let tripInfoTemplate; | ||
const render = function(tripList) { | ||
console.log('in render'); | ||
$('#trip-list').append('<tr><th>ID</th><th>CONTINENT</th><th>COST</th><th>CATEGORY</th></tr>'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we start filling in the contents of the trip list we should clear it out by calling $('#trip-list').empty();
.
This allows the render
function to be idempotent, so that if our application has to call it multiple times (such as when adding or removing a trip), it will still do the correct thing.
BackTREK
Congratulations! You're submitting your assignment!
Comprehension Questions