Can't bind to 'timetable' since it isn't a known property of 'app-timetable'

24 Views Asked by At

this is my student-profile.component.html enter image description here

this is my timetable.component.ts enter image description here

this is my student-profile.ts enter image description here

ERROR-> enter image description here

After trying every possible way to debug this error, i am still getting the same error.

I have a file, data.json file and i wanted to output that data to my html page but not able to show the ouput of the json file on the webpage but still getting the output in my VSCODE console.

1

There are 1 best solutions below

0
Naren Murali On

When you use a component (TimetableComponent)app-timetable in you standalone components HTML, then you need to add it to the imports array of StudentProfileComponent

...
@Component({
  ...
  standalone: true,
  imports: [RouterOutlet, TimetableComponent],
  ...
})
export class StudentProfileComponent {
    ...