我正在使用 @angular v4.0.3 和 webpack 2.2.0。
使用Auler post工作正常,但当我包含 localStorage 时它停止工作。有什么方法可以使它在 angular Universal 中工作或用于 localStorage 的任何模块
local-storage angular-local-storage angular-universal angular
我已经设置了如下所示的延迟路由,
const appRoutes : Routes = [
{ path : '' , redirectTo : '/posts' , pathMatch:'full' },
{ path : 'posts', component:PostsComponent , children: [
{path : 'contact' , component : ContactComponent },
{path : ':slugurl' , component : SinglepostComponent },
{path : 'category/:category' , component : PostfeedComponent },
{path : '' , component : PostfeedComponent },
]},
{ path : 'about', loadChildren : './aboutme/aboutme.module#AboutmeModule' },
{ path : 'admin', loadChildren: './admin/admin.module#AdminModule' , canActivate: [ AuthGuard ] },
{ …Run Code Online (Sandbox Code Playgroud) javascript angular-routing angular2-routing angular angular5