Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

javascript - Angular 5单击上一页后的完整日历重新加载问题(Full Calendar Reload Issue in Angular 5 Clicking Back Page)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...