/ng-layout

simple reusable layouts for AngularJS

Primary LanguageJavaScript

Angular layout directive

Bitdeli Badge

Usage

layout.html

<table> <!-- no white space at the beginning is important -->
  <tr>
    <td>                                <!-- important that the yield is contained in an element -->
      <yield content_for="left" />      <!-- important to close this -->
    </td>
    <td>
      <yield content_for="right" />
    </td>
  </tr>
</table>

main.html

<ng-layout src="layout.html">
  <div content_for="left">
    Hello
  </div>

  <div content_for="right">
    {{ name }}
  </div>
</ng-layout>