getNamedParams(uri) {
    const original_segments = window.location.pathname.split('/');
    const route_segments = uri.split('/');
    const route_length = route_segments.length;
    const params = {};
    for (let i = 1; i < route_length; i++) {
      if (route_segments[i].indexOf('{') !== -1) {
        let name = route_segments[i].substr(1, route_segments[i].length-2);
        params[name] = original_segments[i];
      }
    }
    return params;
  }
Get route named params, for example if URL is /page/{id}, then will return { id: id from url }
@param uri
@returns {Object}