Created
October 8, 2014 17:09
-
-
Save endash/a69298d644fb491ee9c7 to your computer and use it in GitHub Desktop.
Wrap Array in Ember
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
export default function wrapArray(pathToArray, itemController) { | |
return Ember.computed(function () { | |
var content = this.get(pathToArray); | |
return this.container.lookupFactory("controller:array").create({ | |
model: content, | |
parentController: this, | |
itemController: itemController | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment