UPDATE:
on my html page I'm using as the following:
<section ng-repeat="template in templates">
<ng-include src="template"></ng-include>
</section>
but the problem is that I need specific file in certain order so is there a way I can control the way order is rendering?
I'm trying to orderby an object how do I do that and I have searched online 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/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…