Ive started working with Typescript recently and experiencing lots of errors. I can't really find what Ive changed to get errors, but my project was working before. Console shows me:
Project successfully built Successfully deployed on device with identifier '97BCBE2D-2771-44B1-A589-6BAAB994CE37'.
But then it shows so many lines of errors and exceptions:
...
CONSOLE LOG file:///app/tns_modules/@angular/core/src/facade/lang.js:345:16: EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0
CONSOLE LOG file:///app/tns_modules/@angular/core/src/facade/lang.js:345:16: ORIGINAL EXCEPTION: No provider for RouterOutletMap!
....
CONSOLE ERROR file:///app/tns_modules/trace/trace.js:160:30: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
CONSOLE ERROR file:///app/tns_modules/trace/trace.js:160:30: ns-renderer: EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0
...
EXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0
...
Unhandled Promise rejection: EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0
Can you explain to me what these errors mean and how to fix it?
my app.component.ts file:
import {Component} from "@angular/core";
import {RouteConfig} from "@angular/router-deprecated";
import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "nativescript-angular/router";
import {ListComponent} from "./components/list/list.component";
import {CreateComponent} from "./components/create/create.component";
@Component({
selector: "my-app",
directives: [NS_ROUTER_DIRECTIVES],
providers: [NS_ROUTER_PROVIDERS],
template: "<page-router-outlet></page-router-outlet>",
})
@RouteConfig([
{ path: "/list", component: ListComponent, name: "List", useAsDefault: true },
{ path: "/create", component: CreateComponent, name: "Create" },
])
export class AppComponent {}
And my main.ts looks like this:
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
nativeScriptBootstrap(AppComponent, null, { startPageActionBarHidden: false });