ga-wdi-exercises / fun_with_apis

[api]
0 stars 7 forks source link

API Homework #1

Closed nayana487 closed 9 years ago

nayana487 commented 9 years ago

Complete: 5 Comfort: 4

I used the pokemon api for this app. There's not a ton you can do with it, but I really wanted to use it.

I know the CSS is not that great, but I'd love to get feedback on my js file. One thing I'm curious about is the .fail and .always. Is there any use for this other than creating console.logs or alerts? I took the .always out because I didn't see a need for it and it worked without it.

https://github.com/nayana487/pokeapp

nayana487 commented 9 years ago

Also, why does it take so long to load?

jshawl commented 9 years ago

your solution looks great! I recommend removing all nested $.ajax calls and moving those to named functions. As we spend more time on JS, be thinking about how you can decouple your js logic from the view - i.e. is it possible to solve this problem without referencing html elements directly?

re: the taking long

I didn't experience this myself. It could be the API, but I recommend showing some sort of spinner: