hello,
I am developing an application using ADF and Alfresco Process Services (APS).
I am using <adf-tasklist> component to display tasks for a particuar user.
However, I want to customize the way task list appears by default.
I want to add requester name and some start form field columns. For this reason I used a service to get process instance after we get task data from taskListService. However, service to get process instance is asynchronous. So, taskList component is loaded before the data from process instance service is available.
So, how do we prefetch the data from process instance service before component renders the task list view?
Solved! Go to Solution.
Simple flag is the first thing that comes to my mind.
<component *ngIf="!isLoading">...</component>
<progress-spinner *ngIf="isLoading"></progress-spinner>
And set this flag once you finished loading your data
this.isLoading = true;
someMethod().subscribe(() => {
// do some other stuff
this.isLoading = false
});
In this case you delay showing the list and display some progress spinner at the same time
Simple flag is the first thing that comes to my mind.
<component *ngIf="!isLoading">...</component>
<progress-spinner *ngIf="isLoading"></progress-spinner>
And set this flag once you finished loading your data
this.isLoading = true;
someMethod().subscribe(() => {
// do some other stuff
this.isLoading = false
});
In this case you delay showing the list and display some progress spinner at the same time
Thanks for your answer.
I tried to set 'isLoading' to false in my method but the component was not loaded again. So, I thought that component is loaded initially and only once. Is it true?
If not, how to bind component with 'isLoading' property?
I gave just rough example how to achieve what you want. For the details please refer to Angular guides, like Angular Docs
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.