mariuszfoltak / angular2-datatable

DataTable - Simple table component with sorting and pagination for Angular2
202 stars 182 forks source link

Remember paging state between page reloads #15

Open lehphyro opened 8 years ago

lehphyro commented 8 years ago

Great component, nicely done! It would be great if the component remembered which page it was between page reloads. Maybe it could store that information in local storage?

lehphyro commented 8 years ago

Hi, I created a pull request for that

mariuszfoltak commented 8 years ago

Hi, I don't think it's a good idea. Imho datatable directive shouldn't take care of this. However it should emit current page number on change page, and parent component should remember the current page and setting init page on refresh. I'll try to implement emitting event asap.

lehphyro commented 8 years ago

That works for me too, great!