Skip to content

backbone youtube#118

Open
jellyorjam wants to merge 4 commits intoprojectshft:masterfrom
jellyorjam:master
Open

backbone youtube#118
jellyorjam wants to merge 4 commits intoprojectshft:masterfrom
jellyorjam:master

Conversation

@jellyorjam
Copy link

No description provided.

Copy link

@elbaumpj elbaumpj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! A few suggestions for you, overall very well done.


model: VideoModel,

addVideos: function (id, img, title, description) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, addVideos isn't completely necessary. There's some magic happening on the fetch that connects collection and model.

loadVideos: function () {
var items = sampleData.items;

for (i = 0; i < items.length; i++) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you mutate data in the parse function in the collection, I'm not sure you need to do this here.

img: '',
title: '',
description: '',
isMainVideo: false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could update the selected video on click without using the isMainVideo property - this is a slightly more roundabout approach

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants