angular.
    module('commonDirectives', []).
    directive('environment', ['$filter', '$modal', '$timeout', 'naviTreeService', 'environmentService', function($filter, $modal, $timeout, naviTreeService, environmentService) {
        return {
            restrict: 'A',
            link: function ($scope, $elm, $attrs) {
                new environmentSelectionDirective ($scope, $elm, $attrs, $filter, $modal, $timeout, naviTreeService, environmentService);
            },
            scope: {
                env   : '=',  // name and includes array
                state : '=',   //contain profileid, path names and manual class expression (if exist)
                showenvironmentfilterbuttons : '='
            },
            templateUrl:  MP_SITE_URL + '/directives/partials/directive_environmentselection.php',
        };
    }]);