Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[M4.1] Use ng-include on the related videos list to render the template for each video #5

Open
philwestwell opened this issue May 12, 2014 · 0 comments

Comments

@philwestwell
Copy link

(I put this in the book's errata before I thought of putting it here, so maybe you could take thie equivalent comment down from "errata")

For

there is a hint

In fact I wasted a couple of hours troubleshooting this, only to find that ng-include="/templates/video-listing.html" in fact can NOT be used here. Here is what happened:

If I add the suggested statement in the obvious way, like this

then I get

Error: [$parse:syntax] Syntax Error: Token 'templates' is an unexpected token at column 2 of the expression [/templates/video-listing.html] starting at [templates/video-listing.html].

After some trial and error, the working statement I needed was this this:

I don't understand why the first (suggested) attempt didn't work: I can only assume it's because there's a problem parsing a string in that location. Matias will no doubt be in a good position to confirm/refute this. I can see there's a problem with adding my solution as a hint as it requires a bit more background knowledge of the example code.

I feel the way I interpreted the hint was the obvious way that any reader would (but correct me if I'm wrong on this!), and the resulting intractable error message would start to make any reader lose confidence. Confidence is all-important when learning a subject like Angular which, more than most topics, requires a newcomer to keep a lot of plates spinning at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant