Files
web2.0-backend/infoscreen/static/js/infoscreen_controllers.js
T
2016-08-29 20:53:21 +03:00

23 lines
657 B
JavaScript

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