Angularjs include html tutorial

Angularjs include html:

HTML does not support embedding html pages within html page. But we can achieve this functionality using AngularJS. AngularJS provides the ng-include directive to embed HTML pages within a HTML page.



<p>Students with country name:</p>
              <tr ng-repeat = "student in students">
                 <td>{{ }}</td>
                 <td>{{ }}</td>

Include above html file.

    <title>AngularJS Include Example</title>    
    <script src=
     table, th , td {
      border: 1px solid grey;
      border-collapse: collapse;
      padding: 5px;
     table tr:nth-child(odd) {
      background-color: #f2f2f2;
     table tr:nth-child(even) {
      background-color: #ffffff;
      <h1>AngularJS Include Example.</h1>
      <div ng-app = "" 
           ng-init = "students=[{name:'Prabhjot',country:'US'},
        <div ng-include="'testTable.htm'"></div>



Comments are closed.