Code coverage report for src\components\header-voyager\header-voyager.js

# all files / src/components/header-voyager/ header-voyager.js

36.84% Statements 7/19
100% Branches 0/0
20% Functions 1/5
36.84% Lines 7/19

    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
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    481×

    1×

    1×

    1×

    1×

    1×

    1×

     (function component(ng) {

      ng.module('components')
        .component('exHeaderVoyager', {
          templateUrl: './components/header-voyager/header-voyager.html',
          controller: headerVoyagerCtrl,
          controllerAs: 'vm',
          bindings: {
          }
        });

      headerVoyagerCtrl.$inject = ['voyagerFactory', 'showMenu', '$location'];

      function headerVoyagerCtrl(voyagerFactory, showMenu, $location) {
        var vm = this;

        vm.events = [
          {code: 'V3250', event: 'Отправлен', location: '(EEM) PAC CFS Shanghai'}
        ];

        vm.voyage = voyagerFactory.get();

        vm.cancel = cancel;

        vm.save = save;

        vm.show = showMenu.showMenu;

        vm.openEvent = openEvent;

        function cancel() {
          console.log('header Cancel()');
          voyagerFactory.getCancel();
        }

        function save() {
          console.log('header Save()');
          voyagerFactory.getSave();
        }

        function openEvent() {
          $location.path('/event')
        }

      }

    })(angular);