-
-
Notifications
You must be signed in to change notification settings - Fork 241
/
Copy pathapp.module.ts
48 lines (40 loc) · 1.31 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { NgModule, NO_ERRORS_SCHEMA, ErrorHandler } from "@angular/core";
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import {
AppRoutingModule,
navigatableComponents,
} from "./app-routing.module";
import { AppComponent } from "./app.component";
import { ItemsService } from "./items.service";
import { rendererTraceCategory, viewUtilCategory, bootstrapCategory } from "nativescript-angular/trace";
import { addCategories, enable, categories } from "tns-core-modules/trace";
import { SharedModule } from "./shared.module";
addCategories(bootstrapCategory);
addCategories(rendererTraceCategory);
addCategories(viewUtilCategory);
addCategories(categories.ViewHierarchy);
enable();
export class MyErrorHandler implements ErrorHandler {
handleError(error) {
console.log("### ErrorHandler Error: " + error.toString());
console.log("### ErrorHandler Stack: " + error.stack);
}
}
@NgModule({
declarations: [
AppComponent,
...navigatableComponents,
],
bootstrap: [AppComponent],
providers: [
ItemsService,
{ provide: ErrorHandler, useClass: MyErrorHandler }
],
imports: [
NativeScriptModule,
AppRoutingModule,
SharedModule
],
schemas: [NO_ERRORS_SCHEMA],
})
export class AppModule {}