'use strict'; tcrudUI.controller('ApplicationController',function($scope,$http,$location,navigationService) { console.log('start menu controller'); $scope.goLink = function ( path ) { $location.path( path ); console.log('goto link3: '+path); return false; }; $scope.navigationService = navigationService; $scope.applicationMenu = {}; $http.get('<%= troot.tmeta.tserver.tslugs.tbase %>/<%= troot.tmeta.tserver.tslugs.tserver %>/config/menu').then(function ok(response) { $scope.applicationMenu = response.data.data; $scope.applicationMenuKeys = Object.keys(response.data.data); console.log('Menu keys',$scope.applicationMenuKeys); }); });