Build and deliver app to subdirectory
ng build –prod –base-href=https://www.bvbmedia.nl/angular/ Or define the baseHref option like this: “baseHref”: “https://www.bvbmedia.nl/angular/”
Home » Angular
ng build –prod –base-href=https://www.bvbmedia.nl/angular/ Or define the baseHref option like this: “baseHref”: “https://www.bvbmedia.nl/angular/”
? 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”
RewriteEngine On# If an existing asset or directory is requested go to it as it is RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteRule ^
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
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
npm install -g @angular/cling new angular-bvbmedia –style=scss –routing cd angular-bvbmedia npm install popper.js –save npm install bootstrap@4 jquery –save npm install –save @ng-bootstrap/ng-bootstrap ng add
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’;