HTML does not support HTML pages that are embedded in HTML pages. This functionality is achieved by using the following methods:
1. Use Ajax -let a server call to get the corresponding HTML page and set it to the innerHTML of the HTML control.
2. The use of server-side include -jsp,php Web server technology can be included in the dynamic page of the HTML page.
Using ANGULARJS, we can embed another HTML page in an HTML page using the ng-include instruction.
<div ng-app= "" ng-controller= "Studentcontroller" >
<div ng-include= "' main.html '" ></div>
<div ng-include= "' subjects.html '" ></div>
</div>
Example
Tryangularjs.html
Main.html
<table border= "0" >
<tr><td>enter name:</td><td><input type= "text" Ng-model= "Student.firstname" ></td></tr>
<tr><td>enter Last Name: </TD><TD ><input type= "text" ng-model= "Student.lastname" ></td></tr>
<tr><td>name: </td><td>{{student.fullname ()}}</td></tr>
</table>
Subjects.html
<p>Subjects:</p>
<table>
<tr>
<th>Name</th>
<th> marks</th>
</tr>
<tr ng-repeat= "subject in Student.subjects" >
<td>{{ Subject.name}}</td>
<td>{{subject.marks}}</td>
</tr>
</table>
Output
To run this example, you need to deploy textangularjs.html,main.html and subjects.html to a network server. Open textangularjs.html in a Web browser using the server URL. See the results.
The above is ANGULARJS including the data collation, follow-up to continue to collate relevant knowledge, thank you for your support of this site!