Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script>
<link href="http://code.jquery.com/ui/jquery-ui-git.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-git.js"></script>
<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
  <script src="http://angular-ui.github.com/angular-ui/build/angular-ui.js"></script>
  <link href="http://angular-ui.github.com/angular-ui/build/angular-ui.css" rel="stylesheet" type="text/css" />
  <script src="http://angular-ui.github.com/bootstrap/ui-bootstrap-tpls-0.1.0.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
  
  <!-- List - Start -->
  <script id="list.html" type="text/ng-template">
    <div class="content">
      <table class="table table-bordered table-striped table-animated">
          <tr ng-repeat="item in data" script-transclude>
          </tr>
      </table>
    </div>
  </script>
  <!-- List - End -->
  
  <!-- List2 - Start -->
  <script id="list2.html" type="text/ng-template">
    <div class="content">
      <table class="table table-bordered table-striped table-animated">
          <tr ng-repeat="item in data" ng-transclude>
          </tr>
      </table>
    </div>
  </script>
  <!-- List2 - End -->
 
</head>
<body ng-controller="Ctrl">
  
  
  <h3>Using script-transclude</h3>
  <muted>The table is properly formated</muted>
  
  <list data="data">
    <script type="text/template">
      <td>{{item.first}}</td>
      <td>{{item.last}}</td>
    </script>
  </list>
  
  
  <hr>
 
  <h3>Using ng-transclude</h3>
  <muted>TDs are "lost in translation"</muted>
  <list2 data="data">
        <td>{{item.first}}</td>
        <td>{{item.last}}</td>
  </list2>
  
   
</body>
</html>
Output

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

Dismiss x
public
Bin info
marco.m.alvespro
0viewers