Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个类似 facebook 墙的应用程序。
有没有办法可以将实体添加到数组的顶部而不是底部,这样我就可以获得像墙一样的外观?
您可以使用observableArray.unshift将值添加到数组的开头。
observableArray.unshift
myObservableArray.unshift('Some new value') 在数组的开头插入一个新项
您可以在 observableArray 文档中了解更多信息。