Ng Ng Include
# AngularJS `ng-include` Directive
[ AngularJS Reference Manual](#)
* * *
## AngularJS Examples
Include HTML files:
[Try it Yourself Β»](#)
* * *
## Definition and Usage
The **ng-include** directive is used to include external HTML files.
The included content will be rendered as child nodes of the specified element.
The value of the `ng-include` attribute can be an expression that returns a file name.
By default, included files must be located under the same domain.
* * *
## Syntax
ng-include directive as an element:
All HTML elements support this directive.
* * *
## Parameter Values
| Value | Description |
| --- | --- |
| _filename_ | File name, can use an expression to return the file name. |
| onload | Optional, an expression to execute after the file loads. |
| autoscroll | Optional, whether the included part can be scrolled on the specified view. |
* * AngularJS Reference Manual](#)
YouTip