update interval

This commit is contained in:
Jörn-Michael Miehe 2022-09-16 14:29:55 +00:00
parent 7df24feb00
commit 189da9bcf3

View file

@ -63,6 +63,9 @@ import TickerBar from "./components/TickerBar.vue";
}, },
}) })
export default class App extends Vue { export default class App extends Vue {
private interval?: number;
// API data
private logo_above = "Technisches Hilfswerk"; private logo_above = "Technisches Hilfswerk";
private logo_below = "OV Musterstadt"; private logo_below = "OV Musterstadt";
private title_html = "<h1>changeme</h1>"; private title_html = "<h1>changeme</h1>";
@ -181,8 +184,13 @@ export default class App extends Vue {
}); });
} }
public mounted(): void { public created(): void {
this.update(); this.update();
this.interval = setInterval(this.update, 30000);
}
public beforeDestroy(): void {
clearInterval(this.interval);
} }
} }
</script> </script>