Re: [AngularJS] Re: "Cannot match any routes" error caused by URL-encoded query params
Hi Sander, Thank you for mentioning stackblitz. I will try to reproduce the problem there in the following days (need to sort out some priorities first). Cheers On Mar 9, 2018 12:08, "Sander Elias"wrote: > Hi Thihomir, > > Can you try reproducing your problem in a stackblitz? Makes it much easier > to help you. Also, there is a reasonable change you find the issue yourself > by doing the reproduction. > > Regards > Sander > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Angular and AngularJS discussion" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/angular/LsRbl3GrmYU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > angular+unsubscr...@googlegroups.com. > To post to this group, send email to angular@googlegroups.com. > Visit this group at https://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
[AngularJS] "Cannot match any routes" error caused by URL-encoded query params
Hello everybody, I'm experiencing an issue where a link defined like this in a template: Skills works most of the time, but sometimes the router complains with this: core.js:1448 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'admin/skills/skill-list-type%3FredirectTo%3DlastVisited' Error: Cannot match any routes. URL Segment: 'admin/skills/skill-list-type%3FredirectTo%3DlastVisited' at ApplyRedirects.noMatchError (router.js:1719) at CatchSubscriber.eval [as selector] (router.js:1684) at CatchSubscriber.error (catchError.js:105) at MapSubscriber.Subscriber._error (Subscriber.js:131) at MapSubscriber.Subscriber.error (Subscriber.js:105) at MapSubscriber.Subscriber._error (Subscriber.js:131) at MapSubscriber.Subscriber.error (Subscriber.js:105) at MapSubscriber.Subscriber._error (Subscriber.js:131) at MapSubscriber.Subscriber.error (Subscriber.js:105) at LastSubscriber.Subscriber._error (Subscriber.js:131) at ApplyRedirects.noMatchError (router.js:1719) at CatchSubscriber.eval [as selector] (router.js:1684) at CatchSubscriber.error (catchError.js:105) at MapSubscriber.Subscriber._error (Subscriber.js:131) at MapSubscriber.Subscriber.error (Subscriber.js:105) at MapSubscriber.Subscriber._error (Subscriber.js:131) at MapSubscriber.Subscriber.error (Subscriber.js:105) at MapSubscriber.Subscriber._error (Subscriber.js:131) at MapSubscriber.Subscriber.error (Subscriber.js:105) at LastSubscriber.Subscriber._error (Subscriber.js:131) at resolvePromise (zone.js:809) at resolvePromise (zone.js:775) at eval (zone.js:858) at ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:4740) at ZoneDelegate.invokeTask (zone.js:420) at Zone.runTask (zone.js:188) at drainMicroTaskQueue (zone.js:595) at It took me long time to notice that the query parameters are being percent-encoded (URL-encoded) in the error. After I noticed it I tried to replicate the problem by manually encode the parameters in the adress bar and I got exactly the same error. Now it is clear to me that the problem is indeed in the encoding. Since I bound the queryParams in the link as it is shown everywhere around the web (I've revised it many times and it is indeed *bound* with square brackets) I have no clue why the queryParams get encoded and on top of that at random (it's like it works flawlessly 95% of the time and occasionally complains with "Cannot match any routes") so what I did is to bind (with square brackets) routerLink, instead of assigning a value to it: Skills I don't know whether that would fix the problem, as the latter pops up at random. Has anybody encountered such an issue or know what causes the URL to get percent-encoded? Thanks -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
[AngularJS] Both plain and Material checkboxes become uncheckable for no apparent reason
Hello everybody, A weird problem came into existance in my project without being noticed. Both plain HTML checkboxes and Material ones become uncheckable. They are still clickable and handlers attached to the (click) event are being invoked, but the checkboxes themselves never get ticked (so is the boud value - never changed to true). When I put a breakpoint inside a click event the tick appears inside the checkbox, but as soon as the event handler returns the tick disapears (this is for the plain checkbox, the material one gets a transparent circle (part of the animation) around it). It seems to me that there is some code which globally grabs every single checkbox in the page. I tried putting checkboxes in different routes (which translates to different modules, as I use lazy loading of modules). Even put a pair in the login page, which though still an Angular component, is pretty isolated from the rest of the code and the checkboxes were still uncheckable. I tried chasing the offending code backwards with DOM breakpoints for attribute modifications, but there is a lot of code and I find myself lost. I don't have any custom code which grabs checkboxes exclusively and discard/revert their (change) event handler. Nor do I know of any 3rd party module in the project which would do it. Other input elements are unaffected. Unfortunately I can't provide a Plunker as the problem resides in a project, whose license doesn't allow me to upload it in the public domain. Nor do I know which part causes the problem to extract it. I know that this decreases the chance of finding an answer to my question, but I'm hoping that if someone had experienced and solved that would see this topic Thanks -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.