Last active
December 27, 2015 02:19
-
-
Save pbouzakis/7251520 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function itemMapper(parentCourse) { | |
return function (item) { | |
return new itemViewModel(item, parentCourse); | |
}; | |
} | |
// later | |
var firstCourse = terms[0].courses[0]; | |
// inside your object literal | |
observableArrayFromVector(firstCourse.items, itemMapper(firstCourse)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment