Describe the bug
Tried to adapt the grouping in month view into the week view:
https://github.com/mattlewis92/angular-calendar/issues/281
how to access the group array now im the template?
See: https://stackblitz.com/edit/angular-wfnach?file=demo%2Ftemplate.html
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-wfnach?file=demo%2Ftemplate.html
Screenshots
Versions
@angular/core: 6.0.0angular-calendar: 0.24.xPlease see the example below:
https://stackblitz.com/edit/angular-wfnach-4pirbi?file=demo%2Fcomponent.ts
You can click on the event to get the group array.
Sorry @sachin-samel but that doesn't help at all.
I am talking about the week view, not the month view.
nice to come back from holidays and see there is progress, thank you for your work @mattlewis92 will try out the beta now.
@mattlewis92 imho this is still not fixed, how can I access the events from the template?
I can only access one event via the eventTemplate but how can I access the group of events that I define (like here: https://mattlewis92.github.io/angular-calendar/#/group-month-view-events) if I don't have access to the overlying hour element in the template, can you please help?
You can assign the value emitted to your components controller and then access the value in your custom template from there
Hi there,
this is not really helpful as the week view will render the events twice in the hour segment resp. event segemtn, as you iterate over every event in the segment week-view-event.component.
If I group the events and access them in the custom template from component, I don't have control over the iteration happening in the week view component.
In this case then you could extend the week view component and adjust the template there:
@Component({
selector: 'custom-week-view',
template: `
// copy and adjust from https://github.com/mattlewis92/angular-calendar/blob/master/projects/angular-calendar/src/modules/week/calendar-week-view.component.ts#L81-L278
`
})
CustomWeekView extends CalendarWeekViewComponent {}