It's irrelevant where the directory is located. Why?
The typescript file is essentially javascript, which is executed on the client's browser and not the server. The client doesn't have information about the server's structure, so keeping these files in the same folder is purely for the developer's convenience.
The HTM
/ HTML
file resides on your server, where the server lacks knowledge about the client.
To resolve this issue - You need to specify the path to your html file in the $http
command, so that the server can locate it correctly. The path always begins from the root of the folder hosted by IIS (or Apache or any other). For example, if you are hosting it in a folder named someFolder
at the root of the web site folder, then your URL in the typescript file should be /someFolder/help.html
.
If you want to manually verify the correctness of the URL, try entering it directly into the address bar of your web browser (along with the host) and it should display the content.