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 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.