26 lines
853 B
JavaScript
26 lines
853 B
JavaScript
var app = angular.module('infoApp', ['ngAnimate']);
|
|
|
|
|
|
|
|
app.controller('infoscreen_main', function($scope,$timeout){
|
|
$scope.index = -1;
|
|
var templates = [
|
|
{
|
|
template: "/static/html/test1.html?img=siklogo",
|
|
onload: function(){$scope.imagepath = "/static/img/siklogo.jpg";}
|
|
},{
|
|
template: "/static/html/test1.html?img=teekkaribileet",
|
|
onload: function(){$scope.imagepath = "/static/img/teekkaribileet.jpg";}
|
|
},{
|
|
template: "/static/html/test1.html?img=kaukkarit",
|
|
onload: function(){$scope.imagepath = "/static/img/kaukkarit.jpg";}
|
|
},
|
|
];
|
|
$scope.next = function(){
|
|
$scope.index = ($scope.index + 1) % templates.length;
|
|
$scope.active = templates[$scope.index];
|
|
$timeout($scope.next,5000);
|
|
}
|
|
$scope.next()
|
|
});
|