Problem in Routing


#1

i got error in routing

error

System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Error: Application is already started.
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:‘ZoneAwareError’, file:‘file:///data/data/org.nativescript.MobDemo/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js’, line: 993, column: 33
System.err: Frame: function:‘start’, file:‘file:///data/data/org.nativescript.MobDemo/files/app/tns_modules/tns-core-modules/application/application.js’, line: 97, column: 15
System.err: Frame: function:‘NativeScriptPlatformRef.bootstrapApp’, file:‘file:///data/data/org.nativescript.MobDemo/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 84, column: 23
System.err: Frame: function:‘NativeScriptPlatformRef.bootstrapModule’, file:‘file:///data/data/org.nativescript.MobDemo/files/app/tns_modules/nativescript-angular/platform-common.js’, line: 72, column: 14
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.MobDemo/files/app/main.js’, line: 5, column: 42
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: at com.tns.Runtime.runModule(Native Method)
System.err: at com.tns.Runtime.runModule(Runtime.java:530)
System.err: at com.tns.Runtime.run(Runtime.java:522)
System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:19)
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4527)
System.err: … 9 more
ActivityManager: Process org.nativescript.MobDemo (pid 8671) has died


#2

import { NgModule } from “@angular/core”;
import { NativeScriptFormsModule } from “nativescript-angular/forms”;
import { NativeScriptModule } from “nativescript-angular/nativescript.module”;
import { NativeScriptRouterModule } from “nativescript-angular/router”;
import { NativeScriptUIListViewModule } from “nativescript-pro-ui/listview/angular”;
import { platformNativeScriptDynamic} from “nativescript-angular/platform”;

import { AppComponent } from “./app.component”;

import { LoginComponent } from “./pages/login/login.component”;
import { routes, navigatableComponents } from “./app.routing”;

@NgModule({
imports: [
NativeScriptModule,
NativeScriptRouterModule.forRoot(routes)
],
declarations: [AppComponent,
LoginComponent
],
bootstrap: [AppComponent]
})
export class AppModule {}
platformNativeScriptDynamic().bootstrapModule(AppModule);

this is my app.module


#3

export const routes = [
{ path : ’ ', component : LoginComponent}
];

export const navigatableComponents = [
LoginComponent
];