Use services to communicate with a server.Start
Lesson 1 of 1
- 1So far we’ve made AngularJS apps by adding data to a controller, and then displaying it in a view. But what happens when the data contains hundreds of items, or if it’s constantly changing like we…
- 2Well done! The city_name now shows up in the view. How does it work? 1. First in js/services/forecast.js, we made a new service. We used app.factory to create a new service named forecast 2. …
- 3Why are services useful? Instead of filling the controller with code to fetch weather data from a server, it’s better to move this independent logic into a service so that it can be reused by othe…
What you'll create
Portfolio projects that showcase your new skills
In this project, you'll build an email app.
It's time to build fluency in AngularJS fundamentals. In this next Pro Project, we're going to practice code modularization in AngularJS so you can hone your skills and feel confident taking them to the real world. Why? Services help to organize and share your code across your app. What's next? Popular TV shows, a top 10 list, more AngularJS. You got this!
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory