AngularJS directives are extended HTML attributes with an ng prefix. For example, the ng-init directive initializes AngularJS application variables.
Sample AngularJS code snippet is given below:
<div ng-app="" ng-init="firstName='John'">
<p>The name is <span ng-bind="firstName"></span></p>
</div>
Sample AngularJS code snippet is given below:
<div ng-app="" ng-init="firstName='John'">
<p>The name is <span ng-bind="firstName"></span></p>
</div>