Latest web development tutorials

AngularJS ng-include directive

AngularJS Reference Manual AngularJS Reference Manual


AngularJS examples

It contains an HTML file:

<Div ng-include = " ' myFile.htm'"> </ div>

try it"

Definition and Usage

ng-include HTML file that contains instructions for the outside.

It contains the specified element as a child node.

ng-include value of the property can be an expression that returns a file name.

By default, the file contains need to be included in the same domain.


grammar

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

ng-include element is used as a command:

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

All HTML elements support the instruction.


Parameter Value

value description
filename File name, you can use an expression to return the file name.
onload Alternatively, the expression after the file is loaded to perform.
autoscroll Alternatively, if the part contains a scrollable on the specified view.

AngularJS Reference Manual AngularJS Reference Manual