export default()

in frontend/src/directives/PromotionType.es6 [4:23]


export default () => {
    return {
        scope: {
            promotionType: '=',
            campaignGroup: '=',
            coPromotionType: '='
        },
        restrict: 'E',
        template: types,
        controller: 'promotionTypeController',
        controllerAs: 'ctrl',
        link: (scope, elem, attrs, controller) => {
            scope.$watch('promotionType', (n) => {
                if (n) {
                    controller.updateSelectedTab(n.name)
                }
            })
        }
    };
}