Move translation into routes file
- Added intial application load document title update with
created hook
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I73d18ed4a56bd04601fa7382c2d6c2ec504b03f5
diff --git a/src/App.vue b/src/App.vue
index 30de752..b57a91d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -13,8 +13,11 @@
name: 'App',
watch: {
$route: function(to) {
- document.title = this.$t(to.meta.title) || 'Page is missing title';
+ document.title = to.meta.title || 'Page is missing title';
}
+ },
+ created() {
+ document.title = this.$route.meta.title || 'Page is missing title';
}
};
</script>