2
0
Fork 0
tcrud/lib/www_views/node-ff-tcrud/angular/js/application-controller.ejs
2017-12-23 22:45:27 +01:00

18 lines
658 B
Plaintext

'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);
});
});