What Are Templates? Templates are HTML-based documents that are used to generate a user interface. They are used to define the structure of a web page. They contain HTML elements such as divs, spans, forms, and links. They also contain directives, expressions, and filters. AngularJS provides a powerful set of tools that make it easy to create and manipulate templates.
Directives are HTML attributes that are used to tell AngularJS what to do. They are used to bind data to a view and to create custom HTML elements. Directives are used to create custom HTML elements such as buttons, tables, and forms.