Introducing AngularJS services

Until this point, we have discussed some of the core concepts of the AngularJS architecture. The content we covered so far should be a good starter for very small applications or other scenarios where we just need to use out of the box AngularJS directives and other built-in components.

For other types of applications or more advanced usage scenarios, we will sometimes need to reuse code or share data between two or more controllers. Let's take the previous AngularJS example and change it from a user introduction screen to a game setup screen. The screen will now allow the editing of two player names while keeping track of the previous names. To provide this functionality, I have created two separate controllers, ...

Get Learning AngularJS for .NET Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.