Search This Blog

2016-01-11

Angular JS Tutorial4: ng-include

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

Example:
<!DOCTYPE html>
<html lang="en" ng-app="">
<head>
 <title>ng-includes</title>
 <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</head>
<body>
 <div ng-include="'4a.html'"></div> <!-- Need localhost to test this example -->
</body>
</html>

No comments: