Angular

Compress images in build version

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

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 https://medium.com/@cdeniz/transforming-an-existing-angular-application-into-a-progressive-web-app-d48869ba391f https://docs.google.com/document/d/1F0e0ROaZUnTFftmC0XovpREHWHjcXa4CggiFlmifjhw/edit Push notifications: https://docs.google.com/document/d/1F0e0ROaZUnTFftmC0XovpREHWHjcXa4CggiFlmifjhw/edit#heading=h.2fa8d2kg8c1z Stuff I

Read More »

Improving performance

npm install -g source-map-explorerng build -aot source-map-explorer dist/vendor.bundle.js https://medium.com/@cdeniz/transforming-an-existing-angular-application-into-a-progressive-web-app-d48869ba391f

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 »