← BYTES
AngularJS·Intermediate·Ref: 5.2.5

What does the template option in a directive definition object do?

Have a question about this video? Mention reference 5.2.5 when you contact us.

a.It only works for controllers, not directives
b.It supplies the inline HTML string that should replace or be inserted into the directive's element when compiled
c.It defines the directive's CSS stylesheet
d.It is required on every directive and cannot be omitted
template (or templateUrl for an external file) provides the markup the directive renders -- combined with the directive's scope/controller, this is how a directive presents its own reusable piece of UI.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES525#AngularJS