From 33ea101c7d84bb5ca086f107148bbc958659f83f Mon Sep 17 00:00:00 2001 From: Minko Gechev Date: Tue, 25 Dec 2018 14:39:34 -0800 Subject: [PATCH] Integrate with ngx-quicklink --- package.json | 1 + src/app/app-routing.module.ts | 5 +++-- src/app/shared/shared.module.ts | 5 ++++- yarn.lock | 8 ++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 837c651..0332cec 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@angular/core": "6.0.7", "@angular/forms": "6.0.7", "@angular/platform-browser": "6.0.7", + "ngx-quicklink": "../ng-quicklinks/dist/src", "@angular/platform-browser-dynamic": "6.0.7", "@angular/router": "6.0.7", "core-js": "^2.4.1", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 5aaa756..c6ed86b 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core'; -import { Routes, RouterModule, PreloadAllModules } from '@angular/router'; +import { Routes, RouterModule } from '@angular/router'; +import { QuicklinkStrategy } from 'ngx-quicklink'; const routes: Routes = [ { @@ -25,7 +26,7 @@ const routes: Routes = [ // preload all modules; optionally we could // implement a custom preloading strategy for just some // of the modules (PRs welcome 😉) - preloadingStrategy: PreloadAllModules + preloadingStrategy: QuicklinkStrategy })], exports: [RouterModule] }) diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index b270b0e..f24292b 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -8,6 +8,7 @@ import { ArticleListComponent, ArticleMetaComponent, ArticlePreviewComponent } f import { FavoriteButtonComponent, FollowButtonComponent } from './buttons'; import { ListErrorsComponent } from './list-errors.component'; import { ShowAuthedDirective } from './show-authed.directive'; +import { QuicklinkModule } from 'ngx-quicklink'; @NgModule({ imports: [ @@ -15,7 +16,8 @@ import { ShowAuthedDirective } from './show-authed.directive'; FormsModule, ReactiveFormsModule, HttpClientModule, - RouterModule + RouterModule, + QuicklinkModule ], declarations: [ ArticleListComponent, @@ -27,6 +29,7 @@ import { ShowAuthedDirective } from './show-authed.directive'; ShowAuthedDirective ], exports: [ + QuicklinkModule, ArticleListComponent, ArticleMetaComponent, ArticlePreviewComponent, diff --git a/yarn.lock b/yarn.lock index b11af87..f0635d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3974,6 +3974,9 @@ next-tick@1: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" +ngx-quicklink@../ng-quicklinks/dist/src: + version "0.0.0" + no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" @@ -5091,6 +5094,11 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" +rxjs-compat@^6.0.0-rc.0: + version "6.3.3" + resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.3.3.tgz#2ab3b9ac0dac0c073749d55fef9c03ea1df2045c" + integrity sha512-caGN7ixiabHpOofginKEquuHk7GgaCrC7UpUQ9ZqGp80tMc68msadOeP/2AKy2R4YJsT1+TX5GZCtxO82qWkyA== + rxjs@^6.0.0, rxjs@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.1.tgz#246cebec189a6cbc143a3ef9f62d6f4c91813ca1"