import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; import { NativeScriptModule } from "nativescript-angular/nativescript.module"; import { NativeScriptRouterModule } from "nativescript-angular/router"; import { AppComponent } from "./app.component"; import { HomePageComponent } from "./home-page/home-page.component"; import { MyButtonComponent } from './component/my-button/my-button.component'; import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; import { ResultPageComponent } from './result-page/result-page.component'; // Uncomment and add to NgModule imports if you need to use two-way binding // import { NativeScriptFormsModule } from "nativescript-angular/forms"; // Uncomment and add to NgModule imports if you need to use the HttpClient wrapper // import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; @NgModule({ bootstrap: [ AppComponent ], imports: [ NativeScriptRouterModule, NativeScriptRouterModule.forRoot([ { path: "", redirectTo: "/home-page", pathMatch: "full" }, { path: "home-page", component: HomePageComponent}, { path: "result-page", component: ResultPageComponent} ]), NativeScriptModule, NativeScriptHttpClientModule, ], declarations: [ AppComponent, MyButtonComponent, ResultPageComponent, HomePageComponent, ], providers: [], schemas: [ NO_ERRORS_SCHEMA ] }) /* Pass your application module to the bootstrapModule function located in main.ts to start your app */ export class AppModule { }