Chapter 3. Views and controllers

This chapter covers

  • What a view is in AngularJS
  • Creating controllers to manage views
  • Declaring properties and methods in a controller
  • Binding to properties and expressions in an AngularJS template
  • Best practices for creating views and controllers and how to test them

In this chapter, we’ll get into the most fundamental and important facet in AngularJS. You’ll learn what views and controllers are in AngularJS, and more importantly the relationship that they have with each other. There may be some edge case that we haven’t considered but by our approximation, everything in AngularJS is designed to either support views and controllers, or to extend their functionality.

The goal of this chapter is to build ...

Get AngularJS in Action 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.