update interval
This commit is contained in:
parent
7df24feb00
commit
189da9bcf3
1 changed files with 9 additions and 1 deletions
|
@ -63,6 +63,9 @@ import TickerBar from "./components/TickerBar.vue";
|
|||
},
|
||||
})
|
||||
export default class App extends Vue {
|
||||
private interval?: number;
|
||||
|
||||
// API data
|
||||
private logo_above = "Technisches Hilfswerk";
|
||||
private logo_below = "OV Musterstadt";
|
||||
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.interval = setInterval(this.update, 30000);
|
||||
}
|
||||
|
||||
public beforeDestroy(): void {
|
||||
clearInterval(this.interval);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue