Vue.component('episode-publish-form', { template: '
' }) Vue.component('custom-css', { template: '

' }) var app = new Vue({ el: '#app', data: { header: 'Pogo Admin', current_page: "Page Title", page: false, } }) window.onhashchange = setpagecontents window.onload = setpagecontents // I know I'm probably not using // vue.js properly here but it's the // best I can do right now function setpagecontents(){ page = window.location.href.split('#')[1] app.page = page if (page == "publish") { app.current_page = "Publish Episode" } else if (page == "customcss") { app.current_page = "Edit Theme" getcss() } else { app.current_page = "404 Not found" } } function getcss(){ var xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) document.getElementById("css").innerHTML=xmlHttp.responseText; } xmlHttp.open("GET", "/admin/css", true); xmlHttp.send(null); }