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

Images not showing #5

Open
MRSTIGLITZ opened this issue Feb 7, 2016 · 1 comment
Open

Images not showing #5

MRSTIGLITZ opened this issue Feb 7, 2016 · 1 comment

Comments

@MRSTIGLITZ
Copy link

I dont see any console error but the images of the ng-src are not displaying.

@rahullao
Copy link

This is because of incorrect reference to image details. You would observe that relax exercise images shows up but no image for exercises.

In workout.js, rename details to exercise
restExercise = { details: new Exercise({ name: "rest", title: " Relax!", description: " Relax a bit!", image: "img/rest.png", }), duration: workoutPlan.restBetweenExercise };

Correct code
restExercise = { exercise: new Exercise({ name: "rest", title: " Relax!", description: " Relax a bit!", image: "img/rest.png", }), duration: workoutPlan.restBetweenExercise };

And in index.html, instead of using <h1>{{currentExercise.details.title}}</h1> use <h1>{{currentExercise.exercise.title}}</h1>

and

change ng-src="{{currentExercise.details.image}}" /> to ng-src="{{currentExercise.exercise.image}}" />

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

2 participants