Ngx-galleryを追加すると問題が発生します。検査時にエラーが表示されるエラータイプエラー:クラスコンストラクタHammerGestureConfigは 'new'なしでは呼び出せません
App.moduleにhammerjsを追加しましたが、まだ問題があります
これは私のapp.moduleです
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import { BsDropdownModule, TabsModule } from 'ngx-bootstrap';
import { RouterModule } from '@angular/router';
import { appRoutes } from './routes';
import { AuthGuard } from './_guards/auth.guard';
import { AuthService } from './_services/auth.service';
import { ErrorInterceptorProvider } from './_services/error.interceptor';
import { AlertifyService } from './_services/alertify.service';
import { UserService } from './_services/user.service';
import { JwtModule } from '@auth0/angular-jwt';
import { MemberDetailResolver } from './_resolvers/member-detail.resolver';
import { MemberListResolver } from './_resolvers/member-list.resolver';
import { NgxGalleryModule } from 'ngx-gallery';
import { AppComponent } from './app.component';
import { NavComponent } from './nav/nav.component';
import { DashboardComponent } from './dashboard/dashboard.component';
import { RegisterComponent } from './register/register.component';
import { MemberListComponent } from './members/member-list/member-list.component';
import { ListComponent } from './list/list.component';
import { MessagesComponent } from './messages/messages.component';
import { MemberCardComponent } from './members/member-card/member-card.component';
import { MemberDetailComponent } from './members/member-detail/member-detail.component';
export function tokeGetter() {
return localStorage.getItem('token');
}
@NgModule({
declarations: [
AppComponent,
NavComponent,
DashboardComponent,
RegisterComponent,
MemberListComponent,
ListComponent,
MessagesComponent,
MemberCardComponent,
MemberDetailComponent
],
imports: [
BrowserModule,
HttpClientModule,
FormsModule,
BsDropdownModule.forRoot(),
TabsModule.forRoot(),
RouterModule.forRoot(appRoutes),
NgxGalleryModule,
JwtModule.forRoot({
config: {
tokenGetter: tokeGetter,
whitelistedDomains: ['192.168.100.6:5000'],
blacklistedRoutes: ['192.168.100.6:5000/api/auth']
}
})
],
providers: [
AuthService,
ErrorInterceptorProvider,
AlertifyService,
AuthGuard,
UserService,
MemberDetailResolver,
MemberListResolver
],
bootstrap: [AppComponent]
})
export class AppModule { }
ユーザーごとに写真を表示したいのですが、エラーのため表示できません
npm install ngx-galleryの代わりにnpm install @ kolkov/ngx-galleryを使用し、app.moduleの@ kolkov/ngx-galleryからインポートします。
あなたはpackage.jsonを開いて変更することができます "ngx-gallery": "git://github.com/onack/ngx-gallery-dist" の代わりに "ngx-gallery": "^ 5.10.0" あなたはそれらを見つけるでしょう 依存関係