addyosmani / addyosmani/backbone-fundamentals

From Exercise 1: Todo model 'order' attribute

Aperta
#512 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug confirmed
Lingua principale
Rich Text Format
Stelle
9.2k
Fork
1.4k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

// Our basic **Todo** model has `title`, `order`, and `completed` attributes.

In the original model definition for the Todo, this comment states that there will be a title, order, and completed attribute. However we only set the defaults for title, and completed.

And later on in the collection functions, the nextOrder and comparator functions both make use of a .get('order') on the todo object.

Am I missing something? Or does there need to be an order attribute established in the Todo model. If it doesn't need to be established there, then perhaps there should be a note that Todo model WILL have 'title', 'order', and 'completed' attributes, but only title, and completed are defined up front.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.