update data in component from Vue.directive
<p>I have a directive that needs to update data in a Vue.component.  How do I set the value?  Here is my code:</p>

<pre><code>Vue.directive('loggedin', function(value) {
    console.log('loggedin = ' + value);
    vm.$set('loggedIn', value);
});
</code></pre>

<p>vm.$set('loggedIn', value) does not work. I get the following error: 
Uncaught TypeError: Cannot read property '$set' of undefined</p>

<pre><code>var ck = Vue.component('checkout', {
    template: '#checkout-template',

    props: ['list'],

    data: function() {
        return {
            loggedIn: '',
            billingAddr: [],
            shippingAddr: [],

        }
    },
});
</code></pre>

<p>The value being passed is 'true' or 'false'.</p>

<p><strong>EDIT</strong></p>

<p>I need to bind <code>&lt;div v-loggedin="true"&gt;&lt;/div&gt;</code> to my data value in the component and set that to 'true'.  I do not need two-way binding.</p>

<p>Maybe I'm going about this the wrong way.  Basically, I get a value for loggedin from the server and need to set my loggedIn value to true or false in the data on the component.</p>