Devtech

Talk about technologies

Angular 2 Production Build – Minify an Angular App

     In this blog post I am going to show you the steps for minifying the application build using Angular 2. First concern is why minify the angular Application. Angular team released Angular 2 by taking mobile apps in mind. Angular 2 is made especially for the Mobile applications. The hybrid mobile applications that feel like native. These applications are called PWA, Progressive web apps.      To take advantage of the PWA, the size of the application itself must be less enough to load instantly on open up the app. As for the angular application to run, it has to be load fully by the browser. But if the size factor of the application make it slow during the initial load of the page, then it must be a serious concern. Minify a Sample Angular Application      Our application consist of three files:- app.component.ts

app.module.ts

main.ts

     In app.component.ts we define the component for our application. In app.module.ts we define the module of our app and export AppModule. In main.ts we bootstrap our application using the bootstrapmodule of platformBrowserDynamic. AppModule is […]

Show Buttons
Hide Buttons