main.controller.js
905 Bytes
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
(function() {
'use strict';
angular
.module('angular')
.controller('MainController', MainController);
/** @ngInject */
function MainController($timeout, webDevTec, toastr) {
var vm = this;
vm.awesomeThings = [];
vm.classAnimation = '';
vm.creationDate = 1452020281605;
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();
});
}
}
})();