Deploying Angular app in production
This section deals with learning different aspects of deploying an Angular app in  production. In one of the preceding section, you have learnt about how, as part of CI build, Angular app can be built, bundled and minified appropriately to create a JS bundle (artifact) which can be referenced within the index.html
file.
In this section, you will learn about some of the following aspects in relation with Angular app deployment and related optimization techniques in relation with moving the Angular app to production.
- Base tag in index.html file: The HTML tag such as following, as found in
index.htl
, is used for resolving relative URLs to assets such as images, scripts, and style sheets. It can be noted that, during navigation, Angular router uses thebase href
as the base path to component, template, and module files. The following setting works well for development server.
<base href="/">
On production server, the base href
path is changed appropriately...