From f15cc7ac46022487ca36a3d8a66eb86791e040f9 Mon Sep 17 00:00:00 2001 From: Yoshie Muranaka Date: Wed, 9 Sep 2020 10:08:14 -0700 Subject: Move translation into routes file - Added intial application load document title update with created hook Signed-off-by: Yoshie Muranaka Change-Id: I73d18ed4a56bd04601fa7382c2d6c2ec504b03f5 --- src/App.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/App.vue') diff --git a/src/App.vue b/src/App.vue index 30de752b..b57a91db 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,8 +13,11 @@ export default { 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'; } }; -- cgit v1.2.3