Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/router.js
Original file line number Diff line number Diff line change
@@ -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 : ''
};
Expand All @@ -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){
Expand All @@ -24,7 +24,7 @@ class Router{
return riot.route(this._defaultView);
}

this._loadView(view);
this._loadView(view);
}

_loadView(view){
Expand Down