(function () { 'use strict'; //controller that handles user settings stuff var controllerId = 'organisationController'; // Set the digest limit from the default 10 to 20 to allow for a deeper organisation tree mod.config(function ($rootScopeProvider) { $rootScopeProvider.digestTtl(20); }) angular.module('app').controller(controllerId, ['common', 'config', '$scope', 'OrganisationAdminService', 'features', organisationController]); function organisationController(common, config, $route, OrganisationAdminService, features) { var getLogFn = common.logger.getLogFn; var log = getLogFn(controllerId); var logSuccess = getLogFn(controllerId, "success"); var logError = getLogFn(controllerId, "error"); var vm = this; activate(); function activate() { log('Activated Groups View'); getFeatures(); NProgress.done(); } function getFeatures() { OrganisationAdminService.getTopLevelOrg().then(function (org) { features.getCurrentFeatures(org.id).then(function (features) { vm.features = features; }); }); } } })();