angular-modal-gallery: Doesn't work in Angular 5

I’m submitting a…

[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request

Current behavior

I get warnings during compilation and errors in runtime:

Steps to reproduce

  1. Install the latest Angular CLI (1.5.0)
  2. Create a new project: ng new bugTest --skip-commit --skip-git --skip-tests --style scss && cd bugTest
  3. Install angular-modal-gallery: npm i --save angular-modal-gallery hammerjs mousetrap @types/hammerjs @types/mousetrap
  4. Replace contents of app.module.ts with
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import 'hammerjs';
import 'mousetrap';
import { ModalGalleryModule } from 'angular-modal-gallery';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    ModalGalleryModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  1. do ng serve and open http://localhost:4200/ in browser

Environment

Angular CLI: 1.5.0
Node: 8.5.0
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.4.2
webpack: 3.8.1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (12 by maintainers)

Commits related to this issue

Most upvoted comments

I fixed this issue. I’ll release angular-modal-gallery 4.0.0 (major release because there is small breaking change for systemjs users) with official Angular 5 support in one or two days as promised. I’ll also release this library with official Angular Package Format v4.0 support 👍