Aot runtime error thrown on navigation with queryParams
See original GitHub issueAfter 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:
 - Created 7 years ago
 - Reactions:2
 - Comments:12 (5 by maintainers)
 
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

In prod mode:
http://plnkr.co/edit/cZyFnzWTTvy8gFe5iNLL?p=preview
I will create plnkr.