From 7b9bcdf329f05ddcf746c64a12168a2bf0564347 Mon Sep 17 00:00:00 2001 From: Michael Parks Date: Thu, 3 Mar 2016 17:03:55 +0000 Subject: [PATCH] riot.route.exec() deprecated --- src/router.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/router.js b/src/router.js index 048c3ce..8832edb 100644 --- a/src/router.js +++ b/src/router.js @@ -1,7 +1,7 @@ import './pages/home.tag' import './pages/projects.tag' -// we need this to easily check the current route from every component +// we need this to easily check the current route from every component riot.routeState = { view : '' }; @@ -12,9 +12,9 @@ class Router{ this._currentView = null; this._views = ['home', 'projects']; this._defaultView = 'home'; - + riot.route(this._handleRoute.bind(this)); - riot.route.exec(this._handleRoute.bind(this)); + riot.route.start(true); } _handleRoute(view){ @@ -24,7 +24,7 @@ class Router{ return riot.route(this._defaultView); } - this._loadView(view); + this._loadView(view); } _loadView(view){