HTML does not support embedding html pages within html page. To achieve this functionality following ways are used −
Using Ajax − Make a server call to get the corresponding html page and set it in innerHTML of html control. Using Server Side Includes − JSP, PHP and other web side server technologies can include html pages within a dynamic page. Using AngularJS, we can embedded HTML pages within a HTML page using ng-include directive.
<div ng-app = "" ng-controller = “empController">
<div ng-include = "'main.htm'"></div> <div ng-include = "'department.htm'"></div> </div> |