superdesk/superdesk-client-core

View on GitHub
scripts/core/form/SelectDirective.ts

Summary

Maintainability
A
3 hrs
Test Coverage

export default function SelectDirective() {
    return {
        scope: {
            label: '@',
            model: '=',
            options: '=',
            optionLabel: '@',
            optionValue: '@',
            required: '=',
        },
        template: require('./views/select-directive.html'),
        link: (scope, element) => {
            scope.ngModel = element.find('select').controller('ngModel');
        },
    };
}