var app; Vue.component('page-not-found', { template: '#page-not-found', created: function () { alert('404'); } }); new Vue({ // App Root Element el: '#app', // App root data data() { return { f7params: { root: '#app', theme: 'ios', routes: [ { path: '/home/', component: 'home' }, { path: '/url1/', component: 'foo' }, { path: '/url2/', component: 'bar' }, { path: '(.*)', component: 'page-not-found', } ] } }; }, mounted() { this.$f7ready((f7) => { app = this.$f7; }); }, methods: { } });