|
1 |
| -import { enableProdMode, importProvidersFrom } from '@angular/core' |
2 |
| -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' |
| 1 | +import { enableProdMode, importProvidersFrom } from '@angular/core'; |
| 2 | +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; |
3 | 3 |
|
4 |
| - |
5 |
| -import { environment } from './environments/environment' |
| 4 | +import { environment } from './environments/environment'; |
6 | 5 | import { AppComponent } from './app/app.component';
|
7 | 6 | import { AppRoutingModule } from './app/app-routing.module';
|
8 | 7 | import { BrowserModule, bootstrapApplication } from '@angular/platform-browser';
|
| 8 | +import { provideAnimations } from '@angular/platform-browser/animations'; |
9 | 9 |
|
10 | 10 | if (environment.production) {
|
11 |
| - enableProdMode() |
12 |
| - //show this warning only on prod mode |
13 |
| - if (window) { |
14 |
| - selfXSSWarning(); |
15 |
| - } |
| 11 | + enableProdMode(); |
| 12 | + //show this warning only on prod mode |
| 13 | + if (window) { |
| 14 | + selfXSSWarning(); |
| 15 | + } |
16 | 16 | }
|
17 | 17 |
|
18 | 18 | bootstrapApplication(AppComponent, {
|
19 |
| - providers: [importProvidersFrom(BrowserModule, AppRoutingModule)] |
20 |
| -}) |
21 |
| - .catch((err) => console.error(err)) |
| 19 | + providers: [importProvidersFrom(BrowserModule, AppRoutingModule), provideAnimations()], |
| 20 | +}).catch((err) => console.error(err)); |
22 | 21 |
|
23 | 22 | function selfXSSWarning() {
|
24 |
| - setTimeout(() => { |
25 |
| - console.log('%c** STOP **', 'font-weight:bold; font: 2.5em Arial; color: white; background-color: #e11d48; padding-left: 15px; padding-right: 15px; border-radius: 25px; padding-top: 5px; padding-bottom: 5px;'); |
26 |
| - console.log( |
27 |
| - `\n%cThis is a browser feature intended for developers. Using this console may allow attackers to impersonate you and steal your information sing an attack called Self-XSS. Do not enter or paste code that you do not understand.`, 'font-weight:bold; font: 2em Arial; color: #e11d48;' |
28 |
| - ); |
29 |
| - }); |
| 23 | + setTimeout(() => { |
| 24 | + console.log( |
| 25 | + '%c** STOP **', |
| 26 | + 'font-weight:bold; font: 2.5em Arial; color: white; background-color: #e11d48; padding-left: 15px; padding-right: 15px; border-radius: 25px; padding-top: 5px; padding-bottom: 5px;', |
| 27 | + ); |
| 28 | + console.log( |
| 29 | + `\n%cThis is a browser feature intended for developers. Using this console may allow attackers to impersonate you and steal your information sing an attack called Self-XSS. Do not enter or paste code that you do not understand.`, |
| 30 | + 'font-weight:bold; font: 2em Arial; color: #e11d48;', |
| 31 | + ); |
| 32 | + }); |
30 | 33 | }
|
0 commit comments