I’m currently at challenge 202 in FCC. it’s all going great!
but I’m also following an Angular.js course somewhere else and following along building my own app.
however, I’m stuck and the course itself doesn’t provide me with answers. So i was hoping one of you guys could help!
Right now I have a store where there’s a picture and some descriptions, specs and reviews. I wanted to put each element in their own file and make a directive for them in app.js. Only now when I click on description or specs, nothing happens… it used to work great when everything was in the same index.html file.
underneath I’ll post what i have now:
this is the HTML, I’ve also tried to do it without the h4 or as an Attribute. but it won’t work.
Note that I pretty much copied the code in the course itself. but it wont do anything,
in the product-description I did add the head tags but this doesn’t seem to work. My head is starting to spin in frustration, I hope someone can help.
Thank you! So, first of all, what’s the PanelController for?
Aside from that, it works just fine for me if I create an external file for both product-description and product-specs; so I’m having an hard time figuring out what your issue was. Maybe you can compare this plunkr with your code to catch any difference.
I just removed Bootstrap (the javascript file), the PanelController and the h4 wrapping the directive (but just for cleaning up the code, everything worked fine with them as well).
Check out your templateUrl path. I think it should be relative to root of the project.
Also I would strongly recommend to start learning angular 2/4. Nobody really uses angular 1 anymore.
Thanks for the help.
I’m still trying to get the hang of all the versions and frameworks around.
I’m studying towards a development job, I’m in contact with the CEO of a company who tells me what to learn. their job opening said you they use AngularJs 1, I figured it was this one. Please correct me if I’m wrong!
I tried to find the difference, but couldn’t, so I just copied all of it to a new file in Atom en opened it. Still doesn’t work, so the problem must there somehow.
It’s really frustrating 'cause I’ve spend hours trying to make it work. I was more hoping that there would be a clear stupid fault of mine…
about the PanelController, I forgot why it’s there, I think it was part of the course but later replaced by something else.
Hi, sorry for the late respons, I have been working last couple of days, haven’t been able to look at the code.
There are several errors.
Hope you can make something of them, it seems there’s an overlaps or something…