Doesn't work in Angular 5
See original GitHub issueI’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
- Install the latest Angular CLI (1.5.0)
- Create a new project:
ng new bugTest --skip-commit --skip-git --skip-tests --style scss && cd bugTest
- Install angular-modal-gallery:
npm i --save angular-modal-gallery hammerjs mousetrap @types/hammerjs @types/mousetrap
- 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 { }
- 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
Issue Analytics
- State:
- Created 6 years ago
- Comments:21 (12 by maintainers)
Top Results From Across the Web
Why this doesn't work in Angular? - Stack Overflow
I am passing a method from parent component to child component. This child component calls passed method from parent and sends 'this' (child ......
Read more >Angular 5 Tutorial: Guide to Your First Angular 5 App - Toptal
Let's implement it and discuss how it works: import {Component, EventEmitter, OnInit, Output, HostListener} from '@angular/core'; [...] export class ...
Read more >Router tutorial: tour of heroes - Angular
In this tutorial, you build upon a basic router configuration to explore features such as child routes, route parameters, lazy load NgModules, guard...
Read more >Angular Elements doesn't work with Angular v5 #32169 - GitHub
I believe this issue is caused by package webpack: 3.11.0 which is being used in @angular/cli: 1.7.4 . Description. Not the best description...
Read more >48 answers on StackOverflow to the most popular Angular ...
by Shlomi Levi 48 answers on StackOverflow to the most popular Angular questions I gathered the most common questions and answers from ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 👍
oh yes. perfect thank you for your support. I’ll push 4.0.0 final.
I’ll also add your nickname to the changelog with a special thanks 👍
Issue closed