mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(getting-started): mention importing hammer in same file as bootstrap (#6225)
* docs(hammerjs): new import location for Universal As mentioned in #308, if hammerjs is imported in AppModule, Universal server-side rendering will fail as hammerjs is a browser specific library using window, document... So it must be imported in browser entry point src/main.ts instead. * docs(hammerjs): new import location for Universal As mentioned in #308, if hammerjs is imported in AppModule, Universal server-side rendering will fail as hammerjs is a browser specific library using window, document... So it must be imported in browser entry point src/main.ts instead.
This commit is contained in:
committed by
tinayuangao
parent
5967f6e59c
commit
1af2ce6e17
@@ -113,7 +113,7 @@ To install via npm, use the following command:
|
||||
npm install --save hammerjs
|
||||
```
|
||||
|
||||
After installing, import it on your app's root module.
|
||||
After installing, import it on your app's entry point (e.g. `src/main.ts`).
|
||||
```ts
|
||||
import 'hammerjs';
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user