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.

Aot runtime error thrown on navigation with queryParams

See original GitHub issue

After upgrading to 2.2.0 ( and router 3.2.0) I am getting a runtime error on navigation with queryParams.

EXCEPTION: Cannot read property 'appendChild' of null

The weird thing is that the error does not occur while in development mode, nor does the AoT compiler throw any error.

Angular: 2.2.0 Angular router: 3.2.0

Example:

router.navigate( [ ‘home’], { queryParams: { test: ‘test’ }})

Anyone got this error as well?

Angular 2.1.2 works fine with precisely the same code.

// Update So I tried only to update Angular to 2.2.0 and keep Angular-Router on 3.1.2, and the issue remains.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
michalstepiencommented, Nov 16, 2016
1reaction
michalstepiencommented, Nov 16, 2016

I will create plnkr.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Router - Angular
A handler for errors thrown by Router.parseUrl(url) when url contains an invalid character. The most common case is a % sign that's not...
Read more >
How to handle query parameters in angular 2 - Stack Overflow
I try to run it like this and get the following when I do npm start: aot/app/app.component.ngfactory.ts(45,30): error TS2346: Supplied ...
Read more >
Component testing scenarios - Angular
The RouterLink directive throws an error if the event object is missing. Click the elementlink. The following test alternative calls the native element's...
Read more >
angular this parameter property must have an override modifier
Pass query parameters to Router.navigate using queryParams. ... so we can refer to non-existing fields (which will result in runtime errors).
Read more >
@angular/tsc-wrapped | Yarn - Package Manager
76a9a24cdc, fix, encode + signs in query params as %2B (angular#11058 (#45111). d43c0e973f, fix, Throw error when headers are supplied in JSONP request ......
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