Compress images in build version

? 1 npm install –global imagemin-cli imagemin src/assets/images/* –out-dir=dist/angular-bvbmedia/assets/images/ To automate this process add the following lines to package.json: ? 1 “build”: “ng build –prod”

Read More »

Creating Angular Progressive Web App (PWA)

ng add @angular/pwa@~0.6.0ng update @angular/core ng build –prod sudo npm i -g http-server cd dist/angular-bvbmedia/ http-server -p 8000 Push notifications: Stuff I

Read More »

Improving performance

npm install -g source-map-explorerng build -aot source-map-explorer dist/vendor.bundle.js

Read More »

Configure router in Angular project

ng g component dashboard ng g module app-routing Open: srcappapp-routingapp-routing.module.ts Replace contents with: import { NgModule } from ‘@angular/core’; import { RouterModule, Routes } from ‘@angular/router’;

Read More »

Most Popular