Search Posts

Category: multi-level

angularjs multilevel menu didnt work with databse

i created multilevel menu in angularjs with ng-repeat using hardcode its work properly, but whene i change hardcode to database the dropdown doesnt collapse its my controller.js function menuCtrl($scope,$http) { $scope.userName =’Andri’; $scope.menus; $scope.getMenu = function(){ $http({ method : ‘GET’, url : ‘menu.php’ }).then(function(response){ //success $scope.menus =; },function(response){ //error console.log(, response.status); }); }; $scope.getMenu(); // its my hard code // $scope.menus = [ //this data willbe taken by encoded php file // {“id” : […]