# all files / Core/Components/ConfirmDialog/ ConfirmDialogDirective.js

83.33% Statements 5/6
100% Branches 0/0
0% Functions 0/1
83.33% Lines 5/6

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33

    1

    1

    1

    1

    1
     'use strict';

    // Utilities:
    var _ = require('lodash');
    var fs = require('fs');

    // Module:
    var Core = require('../../Core');

    // Dependencies:
    require('./ConfirmDialogController');

    var ConfirmDialogDirective = function () {
        return {
            restrict: 'E',
            transclude: true,

            scope: {
                trigger: '='
            },

            /* eslint-disable no-path-concat */
            template: fs.readFileSync(__dirname + '/ConfirmDialog.html', 'utf8'),
            /* eslint-enable no-path-concat */

            controller: 'ConfirmDialogController',
            controllerAs: 'confirmDialog',
            bindToController: true,
        };
    };

    Core.directive('tractorConfirmDialog', ConfirmDialogDirective);