小编Rod*_*ion的帖子

重载后角度2网址的变化

我有角色queryParamsparams应用程序中的网址.而且我遇到了问题:重新加载页面后我的网址被扭曲了.

params:

http://127.0.0.1:8000/albums?user_id=1

重装后:

http://127.0.0.1:8000/albums/?user_id=1

queryParams:

http://127.0.0.1:8000/albums/%3Aid;id=13

重装后:

http://127.0.0.1:8000/albums/%3Aid%3Bid%3D13

routes.ts

import { ModuleWithProviders }  from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { HomeComponent } from './components/home/home.component';
import { LoginComponent }  from './components/login/login.component';
import { RegisterComponent }  from './components/register/register.component';
import { AlbumsComponent }  from './components/albums/albums.component';
import { AddAlbumComponent }  from './components/albums/add-album.component';
import { AddImageAlbumComponent }  from './components/albums/add-image-album.component';
import { AlbumDetailComponent }  from './components/albums/album-detail.component';
import { PhotosComponent }  from './components/photos/photos.component';
import …
Run Code Online (Sandbox Code Playgroud)

angular2-routing angular

8
推荐指数
1
解决办法
554
查看次数

标签 统计

angular ×1

angular2-routing ×1