Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-init with angular not rendering (and a thank you) #41

Open
FoxxMD opened this issue Oct 17, 2014 · 0 comments
Open

Re-init with angular not rendering (and a thank you) #41

FoxxMD opened this issue Oct 17, 2014 · 0 comments

Comments

@FoxxMD
Copy link

FoxxMD commented Oct 17, 2014

Probably not the best place for this but I'm doing it anyways.

I am using fullcalendar for my app but I really needed to be able to separate events by location -- your fork did a tremendous job of doing this for me! And just in time as the site will be in full use next week. I just want to thank you profusely for putting in the work to make this view a reality! Here's my implementation of your fork if you wanted to see.

Now, for the actual issue, I don't think this is entirely related to your code and it's definitely not it's intended use but I thought i'd report it anyways.

I'm using your fork with angular-ui's ui-calendar. Here's what happens:

  • ui-calendar calls scope.init which in turns invokes the function scope.calendar.fullCalendar(options)
  • fullcalendar does it's thang and your code runs. If, in my resources option objects, I do not include a cssName: [] property then your code automatically adds the empty property.
  • ui-calendar has a $watch on a function that returns the attributes from ui-calendar. When it registers the changes (adding the cssName prop) it calls
    • scope.destroy which is basically just scope.calendar = scope.$parent[attrs.calendar] = elm.html('');
    • then scope.init again

Now ui-calendar does this with the regular fullcalendar in use too. However with the regular calendar it just inits again and renders on the page. When using your fork though, even though it goes through init, the calendar never renders.

I haven't figured out why it doesn't render however I did bandage the bug by including className:[] on my resources options initially rather than letting your code add them later and this stops the $watch trigger and the calendar renders normally.

Thanks again for making this fork! You're awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant