Specifying the base element

We need to inform Angular about the base path we want to use, so it can properly build and recognize the URLs as the user browses the website, as we will see in the next section. Our first task will be to insert a base href statement within our <HEAD> element. Append the following line of code at the end of your code statement inside the <head> tag:

//index.html

<base href="/">

The base tag informs the browser about the path it should follow while attempting to load external resources, such as media or CSS files, once it goes deeper into the URL hierarchy.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset