AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng include Directive

AngularJS ng-include Directive



The ng-include directive is used to include HTML from an external file. The file content will be included as child nodes of the specified element. The value of the ng-include attribute can also be an expression, returning a filename.
It has three parameters i.e, src, onload, autoscroll.




< element ng-include="filename" onload="expression" autoscroll="expression" >< /element > OR < ng-include src="filename" onload="expression" autoscroll="expression" >< /ng-include >


Further Explanation:-


Value Description
filename A filename written with apostrophes.
onload Optional. An expression to evaluate when the included file is loaded.
autoscroll Optional. Whether or not the included section should be able to scroll into a specific view.

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS