title: Check if props in vue.js component template exists
body: <p>After tried many variations, I don't know how to properly style a component's slot or partial code within <code>&lt;template&gt;&lt;/template&gt;</code> section.</p>
  
  <p>Is there a way to check if props <code>&lt;counter :recent="true"&gt;&lt;/counter&gt;</code> from parent level exists, so in a <code>Counter.vue</code> in section <code>&lt;template&gt;&lt;/template&gt;</code> i would show a special html markup for it ?</p>
  
  <p><strong>=== UPDATED ===</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Vue.component('counter', {
   template: `
  &lt;span class="counter" :number="21" v-text="number"&gt;
   &lt;span v-if="recent"&gt;
     since VARTIME
    &lt;/span&gt;
  &lt;/span&gt;
    `,
    data: function(){
     return{
       count: this.number + 1
      }
    },
    props: {
     number: Number,
      recent: {
       type: Boolean,
        default: false
      }
    },
    computed: {
     
    },
    created(){
     if( this.recent === true ){
       console.log('mounted recent true');
      }
    }
  });
  
  new Vue({
   el: "#app",
    
    data: {
     count: ''
    }
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.4/vue.min.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;
  
    &lt;counter :number="20" :recent="true"&gt;&lt;/counter&gt;
    
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>