Question: I have a composite primary key that I would like to insert into another table.

```
create table courses_instructors
(
courseID int foreign key references Course(C_ID) not null,
instructorID int foreign key references Instructor(I_ID) not null,
primary key (courseID, instructorID), --coourseID and instructorID combined is the composite PK
courseTerm varchar(50) not null,
courseNumber int not null,
courseLocation varchar(50),
courseTime varchar(50),
courseMaxOccupancy int,
courseSeatAvailable int
)

create table courses_students
(
studentID int foreign key references student(S_ID) not null,
courseID int, -- foreign key -- I want this value to the be value that represents the composite PK from the courses_instructors
primary key(studentID, courseID), -- these 2 fields combined would make the composite PK, but with the courseID value I will be able to identify who is the instructor for a course and the other details from the course_instructor table
courseOutcome varchar(50)
)

```

All the course come from a course table which only contains the course name and the disciple along with a descrption. The course table has a primary key that identifies each course uniquely.

Answer: 
This route is invalid and you should get an error for it.

```
{ path: '' },

```

A route either needs to have a `component`, a `redirectTo`, or `children`.

If an empty path route has no children it also should have `pathMatch: 'full'`.

I guess what you want is

```
{ path: '', component: DummyComponent, pathMatch: 'full' },

```

Where `DummyComponent` is a component with an empty view.
You can reuse the same `DummyComponent` for all these paths.
This might help someone else.

I was getting this error. I have checked all my defined `routes` in my route file,
the `path` and `components` are defined correctly.

The reason of getting this error was that I forgot to add reference of my `service` in `app.module.ts` which was being used in one of my component to get data from `RestApi`.

So, always add service reference in app.module.ts in `providers` section, immediately after creating service.

```
imports: [
   BrowserModule,
   HttpModule,
   ......
 ],

providers: [
    AuthService, 
    ........ // Here, service reference
]

```