Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <link href="//cdn.jsdelivr.net/picnicss/4.1.1/picnic.min.css" rel="stylesheet">
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <nav>
    <h1>Hello Mag.JS!</h1>
    <a target="_top" href="https://github.com/magnumjs/mag.js">GitHub</a>
  </nav>
  <article class="card">
    <header>
      <h2>Parent Child Comps</h2>
    </header>
    <footer>
      <div id="parent">
        PARENT TOP
        <comp>
          <p>PARENT STUFF INSIDE <num></num>
            <br/>
          <button>INNER CLICK</button>
          </p>
        </comp>
        PARENT BOTTOM
      </div>
      <!-- inline templates -->
      <div class="templates hide">
        <div id="child">
          CHILD TOP
          <div>CHILD TEST <num/></div>
          <children></children>
          <br/> CHILD BOTTOM
        </div>
      </div>
    </footer>
  </article>
  <script src="//rawgit.com/magnumjs/mag.js/master/mag-latest.min.js"></script>
</body>
</html>
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers