Routing error

111 views
Skip to first unread message

Rich Leach

unread,
Dec 6, 2017, 9:12:17 PM12/6/17
to Angular and AngularJS discussion
I'm getting the following error when configuring a new route:

ERROR Error: Uncaught (in promise): EmptyError: no elements in sequence
EmptyError: no elements in sequence

I think this is a pretty simple task, here's what I did:

in my app-routing.module.ts I import the component and then set the path in my Routes array:
  import { ConcreteorderComponent } from './concreteorder/concreteorder.component';
  { path: 'concreteorder', component: ConcreteorderComponent }

(the component is there, I double checked)

and in my app.module.ts I also did an import and set the path in my Routes array (exactly like above). I also added it to my declarations section. I made sure to import "import { RouterModule, Routes } from '@angular/router';" and the component is also being imported as well. In my Routes array I'm also setting 2 other paths:
{ path: 'home', component: HomeComponent },
  { path: '', component: HomeComponent },

which are being returned as expected. 

What am i missing?

Thanks in advance,

Rich



Sander Elias

unread,
Dec 7, 2017, 8:17:25 AM12/7/17
to Angular and AngularJS discussion
Hi Rich,

Frankly, I don't have a clue. Can you reproduce this in a stackblitz?

Regards
Sander
Reply all
Reply to author
Forward
0 new messages