Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Angular SPA subpath

15 Sep 2021 »

https://angular.io/api/common/APP_BASE_HREF https://stackoverflow.com/questions/47331791/add-variable-prefix-to-angular-routing

import {Component, NgModule} from '@angular/core';
import {APP_BASE_HREF} from '@angular/common';

@NgModule({
  providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]
})
class AppModule {}

https://stackoverflow.com/questions/40233080/run-angular2-webpack-behind-a-reverse-proxy-on-subpath

ng build --prod --base-href /my-path/