Managing Client-Side State with Bindings

In Chapter 10, Asynchronously Load Data from Many Sources we saw how Angular uses bindings to detect changes in our model, and how it can update those changes in the view. Angular’s bindings are two-way, meaning that changes on the form are also reflected back on the model.

We saw this in action when we created our Angular test app in Chapter 5, Build a Dynamic UI with AngularJS. If you recall, our app rendered whatever was typed in a text field as the value for an h1 tag. It was Angular’s bindings that made this happen.

Now that we are going to allow users to edit the fields in our form, we’ll need to understand more details about how bindings work. On the surface, it may seem that when a user ...

Get Rails, Angular, Postgres, and Bootstrap now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.