Sitelet https://github.com/angular/angular/issues/37149
Skip to content

HammerModule does not work when imported before BrowserModule聽#37149

Description

@literalpie

馃悶 bug report

Affected Package

This issue affects: @angular/platform-browser

Is this a regression?

This issue exists in version 9.0 and 9.1.7. The HammerModule did not exist before 9.0.

Description

A clear and concise description of the problem...

If the HammerModule is imported before BrowserModule and BrowserAnimationsModule, it seems to have no effect.

馃敩 Minimal Reproduction

stackblitz - notice that panning in the box does not log anything if HammerModule is imported before BrowserModule. If the order is switched, the component logs as expected.

馃實 Your Environment

Angular Version:


Angular CLI: 9.1.6
Node: 12.16.3
OS: darwin x64

Angular: 9.1.7
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.901.6
@angular-devkit/build-angular     0.901.6
@angular-devkit/build-optimizer   0.901.6
@angular-devkit/build-webpack     0.901.6
@angular-devkit/core              9.1.6
@angular-devkit/schematics        9.1.6
@angular/cdk                      9.2.2
@angular/cli                      9.1.6
@angular/fire                     6.0.0
@angular/flex-layout              9.0.0-beta.29
@angular/material                 9.2.3
@ngtools/webpack                  9.1.6
@schematics/angular               9.1.6
@schematics/update                0.901.6
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.42.0

Anything else relevant?
I was unable to find any documentation about this requirement when importing HammerModule, so I assume it is a bug. If it's expected, a simple documentation addition may be enough!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions