Leveling Up with Angular

Angular is a deep technology, and what you’ve mostly seen here is how to use it for tasks you’d normally use JQuery for, and how it makes that code simpler and cleaner. As you create more advanced user interfaces, you’ll benefit from additional features Angular provides for organizing your code.

Creating Reusable Markup with Directives

Suppose we want to add a header to our customer details page that looks like the search results component we created in Chapter 4, Create Clean Search Results with Bootstrap Components. In Rails, we can accomplish this via a partial. In Angular, we can create our own directive that can act as a partial.

Angular directives are highly complex. They aren’t just for sharing markup, but ...

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

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