# all files / app/main/ main.controller.js

100% Statements 20/20
100% Branches 0/0
100% Functions 7/7
100% Lines 20/20

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

    1×

    1×
    4×

    4×
    4×
    4×
    4×

    4×

    1×
    4×
    4×
    1×

    1×
    1×
    1×

    1×
    4×

    4×
    20×

     (function() {
      'use strict';

      angular
        .module('avalikjoodik')
        .controller('MainController', MainController);

      /** @ngInject */
      function MainController($timeout, webDevTec, toastr) {
        var vm = this;

        vm.awesomeThings = [];
        vm.classAnimation = '';
        vm.creationDate = 1458665529027;
        vm.showToastr = showToastr;

        activate();

        function activate() {
          getWebDevTec();
          $timeout(function() {
            vm.classAnimation = 'rubberBand';
          }, 4000);
        }

        function showToastr() {
          toastr.info('Fork <a href="https://github.com/Swiip/generator-gulp-angular" target="_blank"><b>generator-gulp-angular</b></a>');
          vm.classAnimation = '';
        }

        function getWebDevTec() {
          vm.awesomeThings = webDevTec.getTec();

          angular.forEach(vm.awesomeThings, function(awesomeThing) {
            awesomeThing.rank = Math.random();
          });
        }
      }
    })();