question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2] Error calling router.load with route option undefined

See original GitHub issue

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • Framework7 Version: v2.beta2

  • Platform and Target: web

What you did

Call router.load with params.url defined and options.route undefined

Expected Behavior

The route option should be dynamically defined, according to line:

if (!options.route && url) {
    options.route = router.findMatchingRoute(url, true);
  }

Actual Behavior

An exception occurs at a code executed earlier

if (options.route.route &&
   [...]
    return false;
  }

Since there are no docs, i’m not sure what to do. Should the check options.route be checked before accessing it? If so it will be needed to add check also in forward

if (options.route.route.tab) {

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
blikblumcommented, Sep 7, 2017

I use router.load to navigate for dynamic generated pages. The simplest example is: https://codepen.io/blikblum/pen/rwqOpQ . The v2 version (not working due to #1780 ): https://codepen.io/blikblum/pen/MvdrWO

I use it with Marionette.js, it’s working fine so far (preparing a medium article also about using F7). The full integration code is at: https://github.com/blikblum/marionette.f7/blob/master/src/index.js basically i use router.loader passing pageElement, app.popup , app.closeModal and the page events

A more complete example, with multiple views and popups, can be found at https://github.com/blikblum/marionette.f7/tree/master/examples/tab-bar/src

0reactions
lock[bot]commented, Jun 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v2] Error calling router.load with route option undefined #1781
I fixed it but such using of router.load is the v1-way of navigation. In v2 navigation is route based and router.load is mainly...
Read more >
Cannot read properties of undefined (reading '$router') vuejs ...
Calling this inside a callback function creates a new binding to the this object instead of the Vue object in a regular function...
Read more >
ActivatedRouteSnapshot - Angular
Contains the information about a route associated with a component loaded in an outlet at a particular moment in time. ActivatedRouteSnapshot can also...
Read more >
API Reference - Express 4.x
Returns middleware that only parses JSON and only looks at requests where the Content-Type header matches the type option. This parser accepts any...
Read more >
HTTP route components (proto) - Envoy Proxy
The top level element in the routing configuration is a virtual host. ... A domain must be unique across all virtual hosts or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found