AngularJS

Embed external HTML page into AngularJS

Share

You can embed external HTML pages into AngularJS. The most common way, is to use an ajax request to fetch data from the server, and then put the data to the innerHTML of an HTML element.

Basically, ng-include fetches then compiles and includes an external HTML fragment.

<ng-include
src="string" [onload="string"] [autoscroll="string"]>  


</ng-include>

Directive Info:
– This directive creates new scope.
– This directive executes at priority level 400.

Embed external HTML pages:

<div class="container">
<div ng-include="'firstpage.htm'"></div>
<div ng-include="'secondpage.htm'"></div>
</div>

For ngInclude references click here.

Recent Posts

Optimize Your Hormonal Balance: Enclomiphene Citrate for Enhanced Wellness

Hormonal balance plays a pivotal role in overall well-being, influencing various aspects of health, from…

14 hours ago

Paul Kanes Explores the World of Canine Companionship through Dog Walking

Dog walking is an excellent way to maintain your furry friend's camaraderie and provides many…

17 hours ago

Top 5 Must-Have Features Every Mobile App Needs to Succeed

Introduction Businesses understand the diverse requirements of mobile applications, which provide a competitive advantage. There…

22 hours ago

IoT Data Analytics: Ways to Gain Value from IoT Data

The Internet of Things (IoT) has recently changed the world. It links gadgets together and…

22 hours ago

The Rise of NFTs: Exploring the Impact of Non-Fungible Tokens on the Digital Economy

NFTs, or Non-Fungible Tokens, are revolutionizing the digital economy. These unique digital assets, authenticated through…

2 days ago

What to Ask Before You Hand Your Laptop For Repairing

It is safe to say that if you are in need of a good laptop…

2 days ago