My scenario is when clicking particular date in calendar it should navigate to another component.When Clicking Back Button it should navigate back to calendar component and it should load the calendar.But When i reloading empty div is loading and when i click on the div calendar is reloading.I have written the follwing code in Calendar Component ngoninit.
(我的情况是单击日历中的特定日期时,它应该导航到另一个组件。单击后退按钮时,应该导航回到日历组件,并且应该加载日历。但是当我重新加载空div时,当我单击div日历时正在重新加载。我已经在Calendar Component ngoninit中编写了以下代码。)
$('#calendar').fullCalendar({
header: {
left: 'prev',
center: 'title',
right: 'next'
},
selectable: true,
//navLinks:true,
select: (start, end, jsEvent, view) => {
let selectDate= moment(start).format("MM/DD/YYYY");
this.dayClick(selectDate);
}
});
dayClick(date) {
//console.log(date)
let navigationExtras: NavigationExtras = {
queryParams: {
"modid": this.modId,
"submodid": this.subModId,
"uId": this.uId,
"date": date
}
};
this.route.navigate(["timesheet"], navigationExtras);
}
In timesheet component am redirecting back to Calendar Component
(在时间表组件中,我将重定向回日历组件)
redirect() {
this.route.navigate(["timesheetlist" + '/' + + this.modId + '/' + this.subModId + '/' + this.uId]);
}
NgOninit Method in Calendar Component is not loading when reloading.Kindly help on this issue.
(重新加载时未加载“日历组件”中的NgOninit方法。请提供有关此问题的帮助。)
ask by user3680876 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…