1
0
mirror of https://github.com/exane/not-gwent-online synced 2024-12-23 21:03:14 +00: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

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');
}
}
};

View File

@ -9,6 +9,9 @@ module.exports = {
app.section = 'inner';
});
router.on('/test', function() {
})
this.configure();
router.init();
},

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>

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 {