Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Angular Basics Services in Angular Connecting a Service and Component

Daniel Breen
Daniel Breen
14,943 Points

Uncaught (in promise): Response with status: 404 Not Found for URL: /app/entires and other errors

Uncaught (in promise): Response with status: 404 Not Found for URL: /app/entires and other errors is the first error I'm facing.

I modified my code to omit the leading "/" (so that it's app/entires instead of /app/entries in the getEntries() method. Unfortunately, I doubt that's the solution and it looks like it just makes things worse.

After changing the URL as above, I get more errors like:

EXCEPTION: Error in ./EntryListComponent - inline template:0:0 cause by: Failed to execute 'setAttribute' on 'Element': '[]' is not a valid attribute name

ORIGINAL EXCEPTION: Failed to execute 'setAttribute' on 'Element': '[]' is not a valid attribute name.

I made a repo on github for anyone willing to poke around. Thanks in advance!

https://github.com/djbreen7/treehouse-photo-blog

2 Answers

The problem lies in your entry-list-component.html file you have:

<app-entry *ngFor="let entry of entries" []="entry"></app-entry>

should be:

<app-entry *ngFor="let entry of entries" [entry]="entry"></app-entry>
Daniel Breen
Daniel Breen
14,943 Points

Thanks. He originally doesn't type it that way in the video and I must have blinked when he backs up. :)