Duration: 16:41 min
Summary: In this lesson, we are going to talk about custom directives. In the previous lessons we spent some time working with existing directives. Angular gives us the ability to create our own directives. We will start with the usual suspects: ng-app, controller, and the scope. We will add a student object to the scope that contains the student name and course. Then we will add a directive that we will call myStudent. This directive will return a template with student information. Inside the body of the page we will refer to the directive inside a div as an attribute (we can create a directive as a tag. We will see that in another lesson). Notice that the name of the directive is different from that of the div attribute. We simply remove the dash and camel-case the rest. Then, we will see how we can move the content to another html file and use a templateUrl instead.