How to control the deep links of my angular application deployed in an S3 bucket. Accessing...

Discussão em 'Angular' iniciado por Joel Peralta, Fevereiro 6, 2025.

  1. Joel Peralta

    Joel Peralta Guest

    I have built my application guided by this link https://aws.amazon.com/es/blogs/net...-static-websites-with-alb-s3-and-privatelink/ but when I try to enter different links it doesn't allow me. For example, my application enters index.html as the first view and my ALB redirects to my index.html as on the page, I can log in until then my path is mydomain.com/login but when the path changes, for example in my case to mydomain.com/welcome, the application is lost, I have read that it uses hash but I don't know exactly how.

    My app-routing:

    const routes: Routes = [
    { path: 'login', component: LoginComponent, pathMatch: 'full' },
    { path: 'conocimiento', component: ConocimientoComponent },
    { path: 'miequipo', component: MiequipoComponent },
    { path: 'capacidad', component: CapacidadComponent },
    { path: 'talentos', component: TalentosComponent },
    { path: 'welcome', component: WelcomeComponent},
    { path: 'aliado', component: AliadoComponent },
    { path: 'admin', component: AdminComponent },
    { path: 'admproveedores', component: AdmProveedoresComponent },
    { path: 'perfil', loadChildren: () => import('./perfil/perfil.module').then(p => p.PerfilModule) },
    { path: 'financierati', component: FinancieratiComponent},
    { path: '', component: WelcomeComponent, pathMatch: 'full' }
    ];

    @NgModule({
    imports: [RouterModule.forRoot(routes, { useHash: false })],
    exports: [RouterModule]
    })
    export class AppRoutingModule { }


    My ALB [​IMG]

    Continue reading...

Compartilhe esta Página