[RESOLVED] How to remove events from p-schedule

UI Components for Angular
Post Reply
schim
Posts: 7
Joined: 07 Feb 2017, 08:56

20 Oct 2017, 22:32

Good eveving,

Our application ran under Angular 2.1 with prime-ng 1.0.0-beta.17.
Our calendar component (Schedule => p-schedule) used to be initialized with an array of event.

When clicking a "refresh" button, we clean the calendar before getting updated data from the back end:
- Template: <p-schedule [locale]="fr" [events]="eventList" >
- Typescript: this:eventList = [];
- Typescript: call a service and get list of events
- Typescript: store received events in this.eventList. (for each event received, this.eventList.push(receivedEvent) )

It worked.

Since we have upgraded to angular 4.3 and primeng 4.1.0, I'm not able to clean the calendar anymore.
Even the command " this:eventList = [];" is executed, the calendar keep its values.
Once the service has been called, each event received is duplicated.

Would you mind helping me please? How can I clean my calendar before getting data from my back end?

Thanks in advance

Eric
Last edited by schim on 22 Oct 2017, 17:13, edited 1 time in total.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

22 Oct 2017, 15:15

The topic is already discussed here viewtopic.php?f=35&t=52915
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 10 guests