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

weather-app-project #27

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

weather-app-project #27

wants to merge 12 commits into from

Conversation

touhami-ben
Copy link

No description provided.

const searchHistory = document.createElement('li');
let a = document.createElement('a');
a.textContent = city;
a.href = `${BASE_URL}${city}?format=j1`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making the href the api url is making it so that when the link its clicked we get the data object instead of making a fetch call. See photo
Screenshot 2023-01-13 at 10 34 35 AM

What you want is that when a user clicks that link a fetch call is made. You can do this with an event listener.

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

Successfully merging this pull request may close these issues.

2 participants