Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.21/vue.js"></script>
  <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet" type="text/css" /> 
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>  
</head>
<body id="app">
  
  <template id="foo-template">
    <b>foo template</b>
    <br><br>
    <div class="text">{{ fooText }}</div>
    <div class="confirm" v-if="fooConfirm">confirmed</div>
    <div class="btn" v-on:click="closeFoo">close</div>
  </template>
  
  <template id="bar-template">
    <b>bar template</b>
    <br><br>
    <div class="text">{{ barText }}</div>
    <div class="confirm" v-if="barConfirm">confirmed</div>
    <div class="btn" v-on:click="closeBar">close</div>
  </template>
 
  <div class="foo">
    <div class="btn btn-primary" v-on:click="swapToFoo">Show foo template</div>
  </div>
 
  <div class="bar">
    <div class="btn btn-primary" v-on:click="swapToBar">Show bar template</div>
  </div>
  <div class="lightbox" v-show="showLightbox">
    <div class="lightbox-content">      
      <component :is="currentView">
        <!-- component changes when vm.currentview changes! -->
      </component>
    </div>
  </div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
kristonovopro
0viewers