title: How to show modal on component/page created/load in Vue.js
body: <p>I'm new to Vue.js and I struggle with modals. I want to first load the modal window as a user navigates to a certain component. I tried to create some example modal and it opens if I click a button and trigger <code>$('#modalId').modal('show')</code>.  But when I try to execute the same command from Vue's <code>created () {...}</code> It does not open a modal window. I don't want to open a modal window with a button click, I want to open as page/component loads.</p>
  
  <pre><code>    &lt;!-- This works fine --&gt;
      &lt;button class="btn btn-dark" @click="openModal" data-target="#loginModal"&gt;Open modal&lt;/button&gt;
  
      &lt;!-- MODAL --&gt;
      &lt;div class="modal" ref="modal" id="loginModal" data-keyboard="false" data-backdrop="static"&gt;
        &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
              &lt;h5 class="modal-title"&gt;Insert required data&lt;/h5&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;
              &lt;form&gt;
                &lt;div class="form-group"&gt;
                  &lt;label for="username"&gt;Username&lt;/label&gt;
                  &lt;input type="text" class="form-control"&gt;
                &lt;/div&gt;
              &lt;/form&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
              &lt;button class="btn btn-primary" data-dismiss="modal"&gt;Submit&lt;/button&gt;
              &lt;a href="#" @click="logout" data-dismiss="modal"&gt;
                &lt;span&gt;{{ $t('pages.userIconInHeader.signOut') }}&lt;/span&gt;
              &lt;/a&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
  ...
  
  export default {
    name: 'test',
    data () {
      return {}
    },
    created () {
      // HERE I WOULD LIKE TO OPEN MODAL. If it's even possible?
      $(document).ready(function () {
        this.openModal()
      })
    },
    methods: {
      openModal () {
        $('#loginModal').modal('show')
      },
  
  ...
  
  </code></pre>