This tutorial will teach you how to create a CRUD Application using AngularJS,PHP,MySQL and Slim framework.
By :- Anjana Wijesundara
Q1: Directives can be applied to which all element type?
Ans: Following represents the element type and directive declaration style:
`E` – Element name: `
`A` – Attribute (default): ``
`C` – Class: ``
`M` – Comment: ``
AngularJS contains the following core types of objects and components:
These core types can be injected into each other using AngularJS dependency injection mechanism. Throughout the rest of this text I will explain how to define and inject these components into each other.
You can implement the following types of directives:
- Element directives
- Attribute directives
- CSS class directives
- Comment directives
Of these, AngularJS recommends that you try to use element and attribute directives, and leave the CSS class and comment directives (unless absolutely necessary).
The type of a directive determines how the directive is activated. An element directive is activated when AngularJS finds a matching HTML element in the HTML template. An attribute directive is activated when AngularJS finds a matching HTML element attribute. A CSS class directive is activated when AngularJS finds a matching CSS Class. And, a comment directive is activated when AngularJS finds a matching HTML comment.