1
0
mirror of https://github.com/exane/not-gwent-online synced 2026-06-26 21:36:12 +03:00

enable client view change

This commit is contained in:
devfake
2015-06-21 17:14:53 +02:00
parent 897fa598f6
commit 3a31f3031a
4 changed files with 17 additions and 4 deletions
+10 -1
View File
@@ -1,5 +1,14 @@
var Router = require('director').Router;
var router = new Router();
module.exports = {
template: require('../views/navigation.html')
template: require('../views/navigation.html'),
methods: {
changeView: function(view) {
router.setRoute('test');
}
}
};
+3
View File
@@ -9,6 +9,9 @@ module.exports = {
app.section = 'inner';
});
router.on('/test', function() {
})
this.configure();
router.init();
},
+3 -3
View File
@@ -1,7 +1,7 @@
<nav>
<ul>
<li><a href="#/lobby" class="active">Lobby</a></li>
<li><a href="#">Deck Builder</a></li>
<li><a href="#">Highscore</a></li>
<li><a class="active" v-on="click: changeView('lobby')">Lobby</a></li>
<li><a href="#" v-on="click: changeView('builder')">Deck Builder</a></li>
<li><a href="#" v-on="click: changeView('highscore')">Highscore</a></li>
</ul>
</nav>
+1
View File
@@ -5,6 +5,7 @@
use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Handler extends ExceptionHandler {