# all files / Core/Components/Notifier/ NotifierDirective.js

57.14% Statements 4/7
100% Branches 0/0
0% Functions 0/2
57.14% Lines 4/7

    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

    1

    1

    1

    1
     'use strict';

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

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

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

    var NotifierDirective = function (
        notifierService
    ) {
        return {
            restrict: 'E',

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

            link: function ($scope) {
                $scope.notifications = notifierService.notifications;
                $scope.dismiss = notifierService.dismiss;
            }
        };
    };

    Core.directive('tractorNotifier', NotifierDirective);