N
N
n_shipilov2018-08-14 17:13:56
Vue.js
n_shipilov, 2018-08-14 17:13:56

How to display a certain number of array objects (Vue JS)?

There is a component in which I display all the objects of the array.

<div class="post-item" v-for="post in posts">
    <div class="post-item__date">{{post.postDate}}</div>
    <div class="post-item__title">{{post.postTitle}}</div>
</div>

How to implement the display of a certain number of array elements using the same component on another page?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
0
0xD34F, 2018-08-14
@n_shipilov

v-for="post in posts.slice(0, определённое количество)"

And of course, this can be wrapped in a computed property.

7
7rulnik, 2015-01-29
@Jowan

capistranorb.com

V
Viktor Vsk, 2015-01-29
@viktorvsk

You need to start with a good one - try to deploy the project on Heroku (the main thing is to understand that, for example, uploading files will be difficult - you can't store them there, you need third-party services). Plus, all sorts of resque, etc. in order to set it up, you will need to learn another such wonderful tool as Foreman
Well, play around and that's enough.
Take this manual - habrahabr.ru/post/120368 and make a simple deployment.
Capistrano 2 is already old. The new one is 3rd, with a completely different syntax, etc. But you can't say it's better. Just completely different. And focused less on ruby ​​and rails, and more for universal deployment, I would say.
There are few Russian-language articles on the 3rd capistran and rails - habrahabr.ru/post/213269but she's overloaded to begin with. English is also not so hot.
Also, there is such a tool as Mina. After the capistran you have to try.
And in the end, come to all sorts of ansibles, chiefs, pappets, docks.

E
Eugene Burmakin, 2015-01-29
@Freika

https://gorails.com/deploy/ubuntu/14.04 on vps
frey.su/deploy-rails-app-to-locum on locum (actually there are few differences)
You can also look in the direction of free deployment on Heroku.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question