Problem with routes


#1

Hi guys,

I have an application with three important pages: MainView, HomeMain and Calendar.

MainView.ux:

<App>
	<iOS.StatusBarConfig Style="Light" />
	<Android.StatusBarConfig Color="#272932" />

	<Router ux:Name="router" />
    <DockPanel>
		<StatusBarBackground Dock="Top" Background="#272932" />
		<BottomBarBackground Dock="Bottom" />

		<Navigator DefaultPath="splash">
			<SplashPage ux:Template="splash" router="router" />
			<LoginPage ux:Template="login" router="router" />
			<Information ux:Template="information" router="router" />
			<HomeMain ux:Template="home" router="router" />
		</Navigator>
	 </DockPanel>
</App>

My HomeMain.ux:

<Page ux:Name="page2">
			<Router ux:Name="routerHome" />
			<WhileActive Threshold="0.5">
				<Set indicator.LayoutMaster="page2Tab" />
				<Scale Target="HomeTab" Factor="1.2" Duration=".1" />
			</WhileActive>

			<Navigator DefaultPath="home">
				<HomePage ux:Template="home" routerHome="routerHome" />
				<CalendarMain ux:Template="calendar" routerHome="routerHome" />
	</Navigator>
</Page>

CalendarMain.ux:

<Page ux:Class="CalendarMain">
<Router ux:Dependency="routerHome" />
<Router ux:Name="routerCalendar" />

<Navigator Transition="None" DefaultPath="calendarView">
	<CalendarView ux:Template="calendarView" routerHome="routerHome" routerCalendar="routerCalendar" />
</Navigator>

CalendarView.ux:

<PageTrasition ux:Class="CalendarView">
<Router ux:Dependency="routerCalendar"/>
<Router ux:Dependency="routerHome"/>

<JavaScript File="CalendarView.js" />

<Navigator ux:Name="calNav">
	<MonthView ux:Template="month" routerCalendar="routerCalendar" SwipeBack="None" Height="65%" Alignment="Top" Navigator.Reuse="Removed"/>
	<DayView ux:Template="day" routerHome="routerHome" routerCalendar="routerCalendar" ZOffset="1" Navigator.Reuse="Removed"/>
</Navigator>

CalendarView.js:

var d = new Date();
routerCalendar.gotoRelative( calNav, "month", { month: d.getMonth(), year: d.getFullYear() } );

When I log off, I go back to the login page and log in again, it works. But if I enter the calendar page and then log off to log in again, the application closes and gives a route error.

Error: System.ArgumentNullException: Value cannot be null. Parameter name: visual

Problems: Cannot calculate relative node if not rooted

What can this be?