Building the application

If you want to deploy your application to production, we need to first build our application and deploy the files generated after the build to the required server. To build the application for deployment, run the following command:

> ng build --prod

This command will create a dist folder, where you will be able to see all the files of the build app. You could serve this application using a local server such as http-server.

The prod flag in the preceding command creates an optimized bundle of the application. It does Ahead of Time (AOT) compilation using the ngc (the Angular compiler), which is built on top of the TypeScript compiler, to create highly optimized code. This will make the application smaller and faster.

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

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