How to display footer.html at the index.html?

266 Views Asked by At

I am new programmer and I follow the project created by others.

The programmer writes < footer>< /footer> at the index.html.

Then the footer.html has been shown at the index.html.

I have no idea how can he do that.

For more information, the project includes html, css, javascript, php, angular.

Please let me know how to customize new tag and show the page using the tag rather

Thank you.

enter image description here

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Thank you all.

The answer is angular.

myapp.js

var app = angular.module('myApp',[])
.directive('footer',function(){
    return { 
        restrict: "E",
        templateUrl:'include/footer.html'
    }
})

index.html

<html ng-app="myApp">
<footer></footer>