Skip to content

Instantly share code, notes, and snippets.

@nfourre
nfourre / app-routing.module.ts
Last active Jun 6, 2019
Multiple Angular App on same domain using Nginx - appTwo
View app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RouteOneComponent } from './components/route-one/route-one.component';
import { RouteTwoComponent } from './components/route-two/route-two.component';
const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: 'routeOne' },
{ path: 'routeOne', component: RouteOneComponent },
{ path: 'routeTwo', component: RouteTwoComponent },
{ path: '**', redirectTo: 'routeOne' }
@nfourre
nfourre / app-routing.module.ts
Last active Jun 6, 2019
Multiple Angular App on same domain using Nginx - appOne
View app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RouteOneComponent } from './components/route-one/route-one.component';
import { RouteTwoComponent } from './components/route-two/route-two.component';
const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: 'routeOne' },
{ path: 'routeOne', component: RouteOneComponent },
{ path: 'routeTwo', component: RouteTwoComponent },
{ path: '**', redirectTo: 'routeOne' }