<script id="recursion" type="text/ng-template"> <li ng-repeat="item in cate"> <a href="{{item.cateId}}">{{item.cateName}}</a> <ul ng-if="item.child.length" ng-include="'recursion'" ng-init="cate=item.child"></ul>5. </li></script>
<div ng-app="demo"> <div ng-controller="demo"> <ul ng-include="'recursion'"></ul> </div>5.</div>