@igniteui/angular-templates 18.0.1330-beta.3 → 18.0.1330
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/igx-ts/projects/_base/files/package.json +6 -6
- package/igx-ts/projects/_base/files/src/app/app.config.ts +24 -9
- package/igx-ts/projects/_base/files/src/app/error-routing/error/global-error-handler.service.ts +23 -0
- package/igx-ts/projects/_base/files/src/environments/environment.ts +0 -13
- package/igx-ts-legacy/projects/_base/files/package.json +6 -6
- package/igx-ts-legacy/projects/_base/files/src/environments/environment.ts +0 -13
- package/package.json +2 -2
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@angular/platform-browser-dynamic": "~18.0.0",
|
|
20
20
|
"@angular/router": "~18.0.0",
|
|
21
21
|
"hammerjs": "~2.0.8",
|
|
22
|
-
"igniteui-angular": "~18.0.0
|
|
22
|
+
"igniteui-angular": "~18.0.0",
|
|
23
23
|
"minireset.css": "~0.0.7",
|
|
24
24
|
"rxjs": "~7.8.0",
|
|
25
25
|
"tslib": "~2.3.0",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@angular-devkit/build-angular": "~18.0.0",
|
|
30
|
-
"@angular-eslint/builder": "~18.0.0
|
|
31
|
-
"@angular-eslint/eslint-plugin": "~18.0.0
|
|
32
|
-
"@angular-eslint/eslint-plugin-template": "~18.0.0
|
|
33
|
-
"@angular-eslint/schematics": "~18.0.0
|
|
34
|
-
"@angular-eslint/template-parser": "~18.0.0
|
|
30
|
+
"@angular-eslint/builder": "~18.0.0",
|
|
31
|
+
"@angular-eslint/eslint-plugin": "~18.0.0",
|
|
32
|
+
"@angular-eslint/eslint-plugin-template": "~18.0.0",
|
|
33
|
+
"@angular-eslint/schematics": "~18.0.0",
|
|
34
|
+
"@angular-eslint/template-parser": "~18.0.0",
|
|
35
35
|
"@angular/cli": "~18.0.0",
|
|
36
36
|
"@angular/compiler-cli": "~18.0.0",
|
|
37
37
|
"@types/jasmine": "~5.1.1",
|
|
@@ -1,19 +1,34 @@
|
|
|
1
|
-
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
1
|
+
import { ApplicationConfig, ErrorHandler, Provider, importProvidersFrom } from '@angular/core';
|
|
2
2
|
import { provideRouter, withComponentInputBinding } from '@angular/router';
|
|
3
|
-
import { HammerModule } from '@angular/platform-browser';
|
|
3
|
+
import { BrowserModule, HammerModule } from '@angular/platform-browser';
|
|
4
4
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
IgxNavigationDrawerModule,
|
|
7
|
+
IgxNavbarModule,
|
|
8
|
+
IgxLayoutModule,
|
|
9
|
+
IgxRippleModule,
|
|
10
|
+
} from 'igniteui-angular';
|
|
6
11
|
|
|
7
12
|
import { routes } from './app.routes';
|
|
13
|
+
import { GlobalErrorHandlerService } from './error-routing/error/global-error-handler.service';
|
|
14
|
+
import { environment } from '../environments/environment';
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
const providers: Provider[] = [
|
|
17
|
+
[
|
|
11
18
|
provideRouter(routes, withComponentInputBinding()),
|
|
12
|
-
importProvidersFrom(
|
|
13
|
-
provideAnimations()
|
|
14
|
-
provideHttpClient()
|
|
19
|
+
importProvidersFrom(BrowserModule),
|
|
20
|
+
provideAnimations()
|
|
15
21
|
// provide the HAMMER_GESTURE_CONFIG token
|
|
16
22
|
// to override the default settings of the HammerModule
|
|
17
23
|
// { provide: HAMMER_GESTURE_CONFIG, useClass: MyHammerConfig }
|
|
18
24
|
]
|
|
19
|
-
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
if (environment.production) {
|
|
28
|
+
providers.push({
|
|
29
|
+
provide: ErrorHandler,
|
|
30
|
+
useClass: GlobalErrorHandlerService
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const appConfig: ApplicationConfig = { providers };
|
package/igx-ts/projects/_base/files/src/app/error-routing/error/global-error-handler.service.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ErrorHandler, Injectable, Injector, NgZone } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
@Injectable()
|
|
5
|
+
export class GlobalErrorHandlerService implements ErrorHandler {
|
|
6
|
+
|
|
7
|
+
constructor(private injector: Injector, private zone: NgZone) { }
|
|
8
|
+
|
|
9
|
+
handleError(error: any) {
|
|
10
|
+
// handle and/or log error, for example:
|
|
11
|
+
console.error(error);
|
|
12
|
+
|
|
13
|
+
// show error page
|
|
14
|
+
const router = this.injector.get(Router);
|
|
15
|
+
if (router) {
|
|
16
|
+
this.zone.run(() => {
|
|
17
|
+
router
|
|
18
|
+
.navigate(['error'])
|
|
19
|
+
.catch((err: any) => console.error(err));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
// This file can be replaced during build by using the `fileReplacements` array.
|
|
2
|
-
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
3
|
-
// The list of file replacements can be found in `angular.json`.
|
|
4
|
-
|
|
5
1
|
export const environment = {
|
|
6
2
|
production: false
|
|
7
3
|
};
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* For easier debugging in development mode, you can import the following file
|
|
11
|
-
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
|
12
|
-
*
|
|
13
|
-
* This import should be commented out in production mode because it will have a negative impact
|
|
14
|
-
* on performance if an error is thrown.
|
|
15
|
-
*/
|
|
16
|
-
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@angular/platform-browser-dynamic": "~18.0.0",
|
|
21
21
|
"@angular/router": "~18.0.0",
|
|
22
22
|
"hammerjs": "^2.0.8",
|
|
23
|
-
"igniteui-angular": "~18.0.0
|
|
23
|
+
"igniteui-angular": "~18.0.0",
|
|
24
24
|
"minireset.css": "~0.0.7",
|
|
25
25
|
"rxjs": "~7.8.0",
|
|
26
26
|
"tslib": "~2.3.0",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@angular-devkit/build-angular": "~18.0.0",
|
|
31
|
-
"@angular-eslint/builder": "~18.0.0
|
|
32
|
-
"@angular-eslint/eslint-plugin": "~18.0.0
|
|
33
|
-
"@angular-eslint/eslint-plugin-template": "~18.0.0
|
|
34
|
-
"@angular-eslint/schematics": "~18.0.0
|
|
35
|
-
"@angular-eslint/template-parser": "~18.0.0
|
|
31
|
+
"@angular-eslint/builder": "~18.0.0",
|
|
32
|
+
"@angular-eslint/eslint-plugin": "~18.0.0",
|
|
33
|
+
"@angular-eslint/eslint-plugin-template": "~18.0.0",
|
|
34
|
+
"@angular-eslint/schematics": "~18.0.0",
|
|
35
|
+
"@angular-eslint/template-parser": "~18.0.0",
|
|
36
36
|
"@angular/cli": "~18.0.0",
|
|
37
37
|
"@angular/compiler-cli": "~18.0.0",
|
|
38
38
|
"@types/jasmine": "~5.1.1",
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
// This file can be replaced during build by using the `fileReplacements` array.
|
|
2
|
-
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
|
3
|
-
// The list of file replacements can be found in `angular.json`.
|
|
4
|
-
|
|
5
1
|
export const environment = {
|
|
6
2
|
production: false
|
|
7
3
|
};
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* For easier debugging in development mode, you can import the following file
|
|
11
|
-
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
|
12
|
-
*
|
|
13
|
-
* This import should be commented out in production mode because it will have a negative impact
|
|
14
|
-
* on performance if an error is thrown.
|
|
15
|
-
*/
|
|
16
|
-
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@igniteui/angular-templates",
|
|
3
|
-
"version": "18.0.1330
|
|
3
|
+
"version": "18.0.1330",
|
|
4
4
|
"description": "Templates for Ignite UI for Angular projects and components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "Infragistics",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@igniteui/cli-core": "~13.3.0
|
|
15
|
+
"@igniteui/cli-core": "~13.3.0",
|
|
16
16
|
"typescript": "~5.4.3"
|
|
17
17
|
}
|
|
18
18
|
}
|