7

I have a component that contains a <b-card> component like this:

<b-card :title="post.title">
  <p class="card-text">{{ post.body }}</p>
</b-card>

How do I make the card title a clickable link? That is, I can set the text with :title= but there does not exist a parameter to wrap the text in a <a href=""> tag.

1 Answer 1

19

You can disable the render of title and sub-title with no-body option. Then, you can implement the body yourself.

<b-card no-body>
  <b-card-body>
    <b-link to="/">
      <h4>{{ post.title }}</h4>
    </b-link>
    <p class="card-text">{{ post.body }}</p>
  </b-card-body>
</b-card>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.