Using Services to Share Data Between Controllers

Services provide an easy way for us to share data and functionality throughout
our app. The services we create are singletons that can be injected into
controllers and other services, making them the ideal place for writing
reusable code.

The ng-repeat directive iterates over collections within our view, repeating
the contents within the element where ng-repeat is used. Since our list of
messages is currently empty, let's create another controller to help us populate
the list.

Create a controller named PostCtrl that also injects our messages service.
This controller will also contain an addMessage function that uses the add
function we made in our service.