AngularJS has become the go-to framework for many web developers. It is an all-in-one solution for quickly building front-end single-page web applications. But even though it's easier than what came before, Angular can still be quite complicated! Directives, for example, are one of the least-understood features of Angular.
In this Coffee Break Course, designed to teach a new skill or concept in a single sitting, Envato Tuts+ instructor Reggie Dawson will show you how to build an Angular directive with a dynamic template. The display template will be chosen based on the type of content passed to the directive. This directive is built to be easily extensible so that more templates can be added easily.
1. Advanced Angular Directives
[MUSIC] Hello, I'm Reggie Dawson. In this course, I will show you technique to use dynamic templates with your angular directives. Angular directives are probably the area where most new users of angular directives get tripped up. As a result many people stay away from them. The funny thing is if you take a little time directors are not that hard to wrap your head around. These custom HTML components allow you to extend angular and customize it for your own needs. Instead of using a third party library to offer custom components, you have all the tools to build your own. In this course, you will learn how to create a directive that chooses its template based on its content type. We will create a custom component that we can easily add other templates to if we like. After this course, you should have a better idea of what you can do with angular directives.