Code coverage report for src\components\table-mobile\table-mobile.js

# all files / src/components/table-mobile/ table-mobile.js

38.46% Statements 5/13
100% Branches 0/0
25% Functions 1/4
38.46% Lines 5/13

    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
    391×

    1×

    1×

    1×

    1×

     (function component(ng) {

      tableMobileCtrl.$inject = ['voyage', 'dateFactory', 'voyagerListFactory'];

      ng.module('components')
        .component('table3', {
          templateUrl: './components/table-mobile/table-mobile.html',
          controller: tableMobileCtrl,
          controllerAs: 'vm',
          bindings: {
            testData: '@'
          }
        });

      function tableMobileCtrl(voyage, dateFactory, voyagerListFactory) {
        var vm = this;

        init();

        function init() {
          voyage.getList().then(function onSuccess(resolve) {
            vm.testData = ng.copy(resolve.data);

          });
        }

        vm.getDate = dateFactory.getDate;

        vm.selectVoyager = voyagerListFactory.selectVoyager;

        vm.selectAllVoyager = voyagerListFactory.selectAllVoyager;

        vm.viewVoyage = voyagerListFactory.view;

      }

    })(angular);