Angular Frame is a single page application (SPA) that can run in the browser, essentially causing the browser to execute the running code snippets rather than making server calls using a hash ( # ). Typically, a C # URL will go to a specific anchor point on the page; in the case of Angular or other similar SPA infrastructures, # instead redirected to the code segment.
Ideally, you should not refer to this # in the URLs of your page. This is where Html5Mode comes into play. Html5Mode can hide # using the HTML5 Push state (also known as the story API).
When Html5Mode is enabled, the regular links on the page are silently replaced with Angular using event listeners. When these events are fired, the current page is entered into the browser history and a new page is loaded. This gives the illusion that you are moving to a new page and even allowing you to use the back button.
This is good when you are dealing with links that are called from a running application, but rely on event listeners cannot work if you go to a page from an external source where Angular is not loaded into memory. To handle this, you must download your pages from a web server that supports URL rewriting . When the server receives a request for a URL that does not have a physical page, it rewrites the URL to load the basic HTML page where Angular can be loaded and accepted.
When Angular receives a request for a route that has been rewritten in this way, it must first determine what the intended route is. This is where the Base HTML tag comes into play. Angular uses the Base link to help it determine which part of the URL is on the server and which part is the client route. Essentially, where # in the URL will be if Html5Mode was not included.
Unfortunately, Base is an HTML tag that the browser uses more than Angular. The browser also uses this tag to determine the correct location for loading scripts and resources using relative paths, regardless of the path in the location bar. In general, this is not a problem if all the scripts and resources relate to the location of the Index.html file. When the Base parameter is omitted, the browser will load scripts from the visible base path specified by the current URI. However, once you provide it, the browser will use whatever value you provide.
In general, if you do not host Angular on the subpage of your site and want your users to expect something specific in the URL string, you should always control the base on your server and use Base="/" on the client side.