Exercise 1 - Step 3: Typed word for word from the instructions but am unable to move on


#1

In step 3 we are asked to create an html template for the js to point to using the code

<img class="icon" ng-src="{{ info.icon }}">
<h2 class="title">{{info.title }}</h2>
<p class="developer">{{ info.developer }}</p>
<p class="price">{{ info.price | currency }}</p>

I have entered this code into the appInfo.html file and double checked that my appInfo.js file is using 'js/directives/appInfo.html' as its templateURL. Am I missing something? I keep getting the message "Did you display an app's info in js/directives/appInfo.html?"

I am pretty new to both JavaScript and AngularJS so thank you for your help and patience.


#2

I had the same error massage.

I have copied the shown code into my appInfo.js to be sure that i did not make any mistakes in the code and that fixed it for me. Maybe there is just a little syntax error in your appInfo.js.

Maybe you should try this. Hope you'll get it :wink:


#3

I have the same problem. At first I thought I fixed it when I realized I was entering it into appInfo.js instead of appInfo.html. But I fixed that error and still is not working. Please Help!


#4

Yup I was confused by this too but eventually I got it.
My hint is: In index.hmtl, what do you have in line 49? And how does it look compared to line 43 and 46?


#5

In case someone reads this in the future:

I had the same problem and went back to paste the example code over my code and search for any errors. On line 7 of appInfo.js, I had originally typed

templateURL: 'js/directives/appInfo.html'

when it should have been

templateUrl: 'js/directives/appInfo.html'

TemplateUrl is talked about a bit more here: https://docs.angularjs.org/guide/directive


#6

Thank you! I was stuck on this too and did not realize it was supposed to be Url


#7

I'm glad some of you have gotten past this point in the course, but I think there's something wrong with the system; I've copied everything and pasted into the editor just to make sure I wasn't typing something wrong, but after about 5 minutes after hitting the Run button, I'm getting this error:

[33mWARN [karma]: [39mPort 9876 in use

Somehow I feel this is not likely to be an error on my part. Any thoughts? Submitted a bug report for it.


#8

When that error came up for me it was because I had pasted the code into the wrong .js file. I had it in two locations in the end and had to restart to refresh the system. Perhaps you have done the same?