I have a simple array which i would want to output it on my list. The array of the first dimension of the array works when i called it, But the second one wasn't able to be detect. What have I done wrong here or have I missed anything? Below are my code:
Angular.js
angular.module( 'theme' , [
] ).controller('sideController' , function($scope){
$scope.menuName = [
{'name': 'Header' , 'element' : [
{'id' : 'template1' , 'template': 'wp-content/themes/dynamictheme/img/template/template1.png'}
]
}];
})
;
HTML
<div id="slideout" ng-app="theme">
<div id="slideMenu" ng-controller='sideController'>
<ul style="list-style-type: none;">
<!--- Worked --->
<li class="active" ng-repeat="menus in menuName">
<h3><a class="menuItem" id="{{menus.name}}">{{menus.name}}</a></h3>
</li>
<!--- Didn't Work --->
<li id="{{subMenu.id}}" class="draggable" ng-repeat="subMenu in menus.element">
<img src="{{subMenu.template}}" width="200" />
</li>
</ul>
</div>
</div>