Navigation with Angular


#1

Hello nativescript community.

I have been using nativescript for quit sometime now though I have difficulties when it comes to navigation.
In the nativescript play ground link below, am trying to navigate through Play, then Football, then the football label tap takes me to a football module component. I am only able to navigate to the play component, need some help trying to solve this problem. Kindly check the link below.
Thank you in advance.


#2

Seems to be usual copy / paste mistakes,


const routes: Routes = [
    { path: "", redirectTo: "/home", pathMatch: "full" },
    { path: "home", loadChildren: "./home/home.module#HomeModule" },
    { path: "football", loadChildren: "./football/home.module#FootballModule"}
];

loadChildren: “./football/home.module#FootballModule”}


#3

I’ve rectified the typo error but still the navigation won’t work


#4

#5

From which component you are trying to navigate to football module?


#6

from the play-list-item component to the football module.
but before navigating to the football module i need to navigate first from the activity-list-item component to the to the play component.


#7

#8

Please double check your code, may be its again a copy / paste issue. PlayListItemComponent seems never used in home module.


#9

PlayListItem Component is a child of Play Component. The navigation code to the football module is within the PlayListItem Component. While the navigation code to Play Component is within the ActivityListItem.