Mon application spring-boot/angular 2 (hébergée sur Tomcat intégré) fonctionne correctement sur Chrome, Safari, Opera et Edge. Toutefois, sur IE, l'application achemine directement vers le composant PageNotFound. Ajout de cales pour IE à index.html mais toujours pas de chance. vous remercie à l'avanceangulaire 2 routage inattendu sur Internet Explorer
index.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> </title>
<base href=".">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="./res/images/favicon.ico">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- application css -->
<link href="./res/styles/app.css" rel="stylesheet" />
<script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.33.3/es6-shim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
<script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
</head>
<body>
<app-root>Uygulama Yükleniyor...</app-root>
</body>
</html>
app-routing.module.ts
rt {NgModule} from '@angular/core';
import {Routes,RouterModule} from '@angular/router';
import {OrtakListComponent} from './ortak/ortak-list.component';
import {LoginComponent} from './login/login.component';
import {PageNotFoundComponent} from './page-not-found.component';
import {AuthGuard} from './guards/auth.guard';
import {ForgotPasswordComponent} from './login/forgot-password.component';
const routes:Routes =[
{path:'' , pathMatch:'full' , redirectTo:'login',},
{path:'ortak/:id', component:OrtakListComponent,canActivate:[AuthGuard],loadChildren:'./ortak/ortak.module#OrtakModule'},
{path:'login' , component:LoginComponent},
{path:'forgotpassword',component:ForgotPasswordComponent},
{path:'**',pathMatch:'full',component:PageNotFoundComponent},
];
@NgModule({
imports:[RouterModule.forRoot(routes)],
exports:[RouterModule]
})
export class AppRoutingModule{}
export const routableComponents = [
LoginComponent,
PageNotFoundComponent,
ForgotPasswordComponent,
];
https://www.polsannet.com/webapp/login est l'URL – desperado06
{path: '', pathMatch: 'full', redirectTo: 'login',}, changer pour {path: '', pathMatch: 'full', redirectTo: 'login'}, peut-être que c'est un problème avec l'analyse JSON –
BTW. pourquoi vous n'utilisez pas dans index.html? –