1
我createsimple angular2項目完成iOS上工作生成使用科爾多瓦但我的默認router
沒有加載上的iOS設備,它工作在瀏覽器和Android設備精。下面是我的app-routing.module.ts
,也是我已經設置了base href="/"
在index.html
文件角2路由器沒有iPhone設備我有建用科爾多瓦
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from './dashboard.component';
import { HeroesComponent } from './heroes.component';
import { HeroDetailComponent } from './hero-detail.component';
const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'detail/:id', component: HeroDetailComponent },
{ path: 'heroes', component: HeroesComponent }
];
@NgModule({
imports: [ RouterModule.forRoot(routes) ],
exports: [ RouterModule ]
})
export class AppRoutingModule {}
做到這一點'base href =「。」 ' –
謝謝帕特對我的工作 – sukumar
添加爲答案,你可以接受它 –