Skip to content

Instantly share code, notes, and snippets.

@sinsunsan
Created March 31, 2015 10:23
Show Gist options
  • Save sinsunsan/0ea353606aa80ee4c87a to your computer and use it in GitHub Desktop.
Save sinsunsan/0ea353606aa80ee4c87a to your computer and use it in GitHub Desktop.
- var list = {class:"testClass", ngModel:"testNgModel", item: "testItem", value: "testValue"}
mixin recursivList(list)
ul(class='#{list.class}')
li(ng-repeat='#{list.item} in #{list.ngModel}') {{ #{list.value} }}
block
mixin recursivList1(list)
ul(class='#{list.class}')
li(ng-repeat='#{list.item} in #{list.ngModel}', ng-bind=list.value)
block
div test1
+recursivList(list)
+recursivList(list)
div test2
+recursivList1(list)
+recursivList1(list)
@sinsunsan
Copy link
Author

résultats

<div>test1
  <ul class="testClass">
    <li ng-repeat="testItem in testNgModel">{{ testValue }}
      <ul class="testClass">
        <li ng-repeat="testItem in testNgModel">{{ testValue }}
        </li>
      </ul>
    </li>
  </ul>
</div>
<div>test2
  <ul class="testClass">
    <li ng-repeat="testItem in testNgModel" ng-bind="testValue">
      <ul class="testClass">
        <li ng-repeat="testItem in testNgModel" ng-bind="testValue">
        </li>
      </ul>
    </li>
  </ul>
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment