updated ''router'' engine (without vue-router)

This commit is contained in:
xdrm-brackets 2017-12-04 22:57:24 +01:00
parent 19a9ab9dc4
commit 6bcc725d31
3 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ window.gstore.add('menu_item', {
label: 'Profil',
icon: 'profile'
}, inbox: {
label: 'Boîte de réception',
label: 'Messagerie instantannée',
icon: 'messages'
}
});

View File

@ -22,8 +22,9 @@ export default {
methods: {
navigate_menu(page){
// (1) Manage action
// (1) Update URL
console.log('Loading page \''+page+'\'');
window.history.pushState(page, page, '/'+page+'/');
// (2) Activate current element
this.gstore.menu_item_active = page;

View File

@ -8,7 +8,7 @@
<menu-comp></menu-comp>
<!-- Container -->
<message-container></message-container>
<message-container v-show="gstore.menu_item_active == 'inbox'"></message-container>
</div>
</template>