Day 2: Creating Controllers and Views

Just as in the MVC architecture, AngularJS controllers orchestrate data flow between models and views. We’ll spend our second day learning all about controllers and how to make views dynamic with directives. We’ll have a closer look at the $scope, which is the glue between controllers and views. To put what we learn into practice, we’ll create a view for the bookmark list and a form for creating and editing bookmarks. When we’re done, we’ll have a front end as shown in the figure.

images/src/angularjs/basicApp.png

So far we’ve retrieved data from the server with a resource to produce data objects. Today we’ll complete the flow of data down ...

Get Seven Web Frameworks in Seven Weeks 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.