UPDATE:
on my html page, which I use as follows:
<section ng-repeat="template in templates">
<ng-include src="template"></ng-include>
</section>
but the problem is that I need a specific file in a specific order, so is there a way I can control how the order is rendered?
I am trying to arrange the object, how can I do it, and I searched for it before posting it here.
function MyCtrl($scope) {
$scope.templates = {
template_address: "../template/address.html",
template_book: "../template/book.html",
template_create: "../template/create.html"
};
<div ng-app ng-controller="MyCtrl">
<ul>
<li ng-repeat="(name, path) in templates">{{name}}: {{path}}</li>
</ul>
</div>
http://jsfiddle.net/abuhamzah/6fbpdm9m/
source
share