I have two HTML files (test1.html, test2.html) in the same directory called projects
. My goal is to include one HTML file into the other.
In test1.html, I have included the contents of test2.html using the following code:
Case1:
<div ng-include src="'/home/projects/test2.html'"></div>
This setup is working correctly.
Case2: However, I am wondering why I need to provide the full path. So, I tried the following approach, but it did not work:
<div ng-include src="'test2.html'"></div>
Additionally, I have created a symbolic link for the parent directory of projects named front-end. The symlink points from home to ../../front-end/
Within front-end, the projects directory is available, where both test1.html and test2.html are located.
Please explain why Case 2 is not working even though both files are in the same directory.