diff options
author | Derick Montague <derick.montague@ibm.com> | 2019-12-06 10:28:38 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-01-23 02:45:29 +0300 |
commit | c8636e533ffadde75468cfd4014e681b481fbb3c (patch) | |
tree | 14d1350abc61b375410a5a58760fc7d03647e85c /src/App.vue | |
parent | 75b4832122dee0c7589f91f64736d8c5fb7f8ce8 (diff) | |
download | webui-vue-c8636e533ffadde75468cfd4014e681b481fbb3c.tar.xz |
Add page titles using route meta data
Adding the page title using the route assures that each page has a set
title.
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I75cdd39a1ccdfe4ac9757886e22f016188f42360
Diffstat (limited to 'src/App.vue')
-rw-r--r-- | src/App.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue index 56674955..d5b49329 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,11 @@ <script> export default { - name: "App" + name: "App", + watch: { + $route: function(to) { + document.title = to.meta.title || "Page is Missing Title"; + } + } }; </script> |