title: Vue.js: toggle class onclick
body: <p>I'm trying to set a class depending on if certain values are true.</p>
  
  <p>My div:</p>
  
  <pre><code>&lt;template&gt;
  &lt;div class="navbar" v-bind:class=" {'test1': static, 'test2': isActive } "&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>and in the script part of my component, I've written this:</p>
  
  <pre><code>&lt;script&gt;
  
  export default {
    name: 'my-component',
    data: {
      static: true,
      isActive: true
    }
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>According to my understanding, this should show both the <code>test1</code> class, and the <code>test2</code> class. What am I misunderstanding -- shouldn't this be working? I want to toggle classes on click of a button, but I can't get this part working.</p>