A
A
alaskafx2021-05-10 18:01:08
Vue.js
alaskafx, 2021-05-10 18:01:08

How to route/redirect the user to a specific link belonging to this particular card?

connecting via cdn!

How can I redirect the user to exactly "the" link that the object has?
Here is an example: I have this in Json:

{
        "id": 1,
        "title": "БЕТА-ТЕСТ УЖЕ ОТКРЫТ!",
        "data": "07.05.2021",
        "link": "https://some.site"
    },


and I want to direct the user to this link.
I tried to make from for, in - but it didn't work.
I wrote something like that, but you see "more details?"
<div class="news-n-card" id="sg pz" v-for='(newsi, index) in news' :key='index' ><h3>{{ newsi.data }}</h3><h1>{{ newsi.title }}</h1> <a> Подробнее </a></div>


- This "more" should point to its own link, where, for example, it's https://some.site .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Olga, 2021-05-10
@alaskafx

<a :href="newsi.link"> Подробнее </a>?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question