Using .findBy() with Ember-data-populated array controller

删除回忆录丶 提交于 2019-12-05 08:04:46

findBy takes 2 arguments, property key to test against, and value to find (it defaults to true if not passed in). Essentially you are searching for a model with a property TYPE1 that's true

You're probably looking to do this

findBy("id", "TYPE1")

http://emberjs.com/api/classes/Ember.Array.html#method_findBy

Returns the first item with a property matching the passed value. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to true.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!