summaryrefslogtreecommitdiff
path: root/src/App.vue
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2019-12-06 10:28:38 +0300
committerDerick Montague <derick.montague@ibm.com>2020-01-23 02:45:29 +0300
commitc8636e533ffadde75468cfd4014e681b481fbb3c (patch)
tree14d1350abc61b375410a5a58760fc7d03647e85c /src/App.vue
parent75b4832122dee0c7589f91f64736d8c5fb7f8ce8 (diff)
downloadwebui-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.vue7
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>