Supun Nakandala
Supun Nakandala

Reputation: 59

knockoutjs observable array

I am trying to create a facebook wall-like application.

Is there a way that I can add entities to the top of array rather than at the bottom so that I can get a wall like appearance?

Upvotes: 0

Views: 106

Answers (1)

Joachim Isaksson
Joachim Isaksson

Reputation: 180917

You can use observableArray.unshift to add values to the start of the array.

myObservableArray.unshift('Some new value') inserts a new item at the beginning of the array

You can read more about it in the observableArray documentation.

Upvotes: 2

Related Questions