Tuesday, 28 July 2015

How to load a html page inside another html page in AngularJS

To load a html page inside another html page we usually go forhtml iframe tag in which we can either set HTML file path or any URL from different domain in src attribute. Ex.
<iframe src="http://findnerd.com"></iframe>
In AngularJS we can do that by using ng-include directive, where we can give the path of our HTML page and in will be rendered within the HTML page. Ex.
 <div ng-include="'myPage.html'"></div>
Here ng-include is expecting variable with the name of the file to include. To pass the name directly as a string, we use single quotes (' . . . ').
To view the full article about how to load a html page inside another html page in AngularJS Visit FindNerd.
FindNerd is providing programming queries solutions. Visit us to post your query of android, php, java, c,Javascript programming questions and answers etc., on ask question and get instant solution.



No comments:

Post a Comment