constructor()

in frontend/src/controllers/PromotionFormController.es6 [12:32]


    constructor($state, $stateParams, $scope, promotionService, campaignService, environmentService, uuid, $q) {
        this.service = promotionService;
        this.campaignService = campaignService;
        this.environmentService = environmentService;
        this.$scope = $scope;
        this.$state = $state;
        this.uuid = uuid;
        this.$q = $q;
        this.$scope.serverErrors = [];
        this.$scope.campaignGroup = this.environmentService.getCampaignGroup();
        this.$scope.campaignGroupDomain = this.environmentService.getCampaignGroupDomain();
        this.$scope.createPromotionCopy = !!$stateParams.createPromotionCopy;

        if ($stateParams.uuid) {
            this.fetchPromotion($stateParams.uuid);
        } else if ($stateParams.campaignCode) {
            this.createNewPromotion($stateParams.campaignCode);
        } else {
            // Later
        }
    }